I'm currently using this component in xamarin
http://components.xamarin.com/view/SidebarNavigation and basically it works fine, but when i try to use a UITableViewController as one of my content and add a lot of items in tableview that will basically make the app scroll, the app didn't actually scroll when you run it to iOS simulator, I haven't add any code yet to my contentController and I haven't change any property on my UITableView, just drag a UITableViewController from toolbox set up the code behind controller, storyboard ID, Restoration ID add some data to the tableView then hit run.
I don't know if this is a bug or I'm doing something wrong? any idea everyone? or you can just give me any free component that use as navigation drawer in iOS app.
thanks!
I think it's a bug!
You can solve it by wrapping your uitableview in a uiview.
Just make a fresh view controller and put a tableview as its only child!
Good luck ;)
Related
When I compile and run my tvOS project with the new Xcode13+, the tab bar scrolls with the scrollView, and I can't access the split view controller moving the focus.
The issue doesn't happen with Xcode < 13. However, after updating to Monterey, I don't have a choice.
Pre-condition:
Create an app on tvOS with a tab bar controller;
In one of the tab, put a split view controller;
In the collapsed master view controller, put a table view.
Issue 1:
Observe that moving the focus towards the left to open the collapsed master view controller, doesn't work anymore. The master view controller won't be pulled out. The only way to pull it out is to tap the back button (ex menu button).
Issue 2:
Scrolling down on the tableView in the master view controller would also scroll away the tab bar at the top (this was possible only setting the tabBarObservedScrollView before, but now is deprecated and it happens automatically. Even using [self setContentScrollView:nil forEdge:NSDirectionalRectEdgeAll] doesn't help.
Did anyone get the same problem? Do you know why this happens and if it can be solved?
In the meantime, I reported the problem to Apple.
PS. another odd thing is that the Apple documentation for setContentScrollView:forEdge: is empty (as of today).
Update:
Observe how even setting the property to nil, it is still populated:
After deeper investigation, I found that the problem happens only when compiling with Xcode13+ and running on tvOS15+.
For some reason, the property above is automatically populated for ALL UITableViewController.
Replacing the UITableViewController with a UIViewController with a UITableView inside solves the Apple issue.
This is a bug with Apple SDK:
Observe how even setting the property tabBarObservedScrollView to nil, it is still populated:
This happens for ALL UITableViewController.
Replacing the UITableViewController with a UIViewController with a UITableView inside wor the Apple issue.
--
Regarding the swipe left, it's another Apple bug or decision to not allow the focus to move on the master view controller when on a split view controller.
The tvOS Settings app has a large hierarchical UITableView. Items that go deeper have a ">".
What is the best way to do this? Are they reloading the table completely? It looks like they are sliding one view out for another. I am not using a storyboard so how can I accomplish this?
Note that my app actually does have a storyboard, but this UITableView needs to happen in a view that takes up less than the full screen and is controlled by its own ViewController... like preferences window.
Has anyone seen example code of a "deep" UITableView?
They're using a UINavigationController, which is what causes that "sliding" effect.
In the video, it's a little difficult to see what's going on, so I'll try to explain it.
https://youtu.be/yOrCJB9yZlg
I have UIViewController with UITableView inside its root view. Binded via Autolayout (there is no difference how it's binded: to SuperView or to SafeArea).
SearchBar added like this:
let search = UISearchController(searchResultsController: nil)
self.navigationItem.searchController = search
When I slowly scroll table, the transition between large navbar and compact navbar, and then animation of showing in and out of searchBar is too fast. Searchbar jumping in/out of navbar instead of smoothly opened/closed; navbar transitioning is jumping between two states, large and compact, without smoothly passes through the middle half-opened state while you slowly moving your finger on screen, like in system apps (Mail, Phone, Messages, Contacts etc).
I made the example from an empty project to demonstrate the issue; there isn't any changes to navigation bar logic, or any logic at all. Just two new VC's and this odd behaviour.
If i create xCode's "Master-Details" project example and add UISearchController to it, it will work properly. I assume its because they used UITableViewController instead of UIViewController + UITableView inside.
What the reason of this behaviour and how to fix it?
I had the same problem with the search controller transition and tableview.
like this its flickering or tableview was jumping. The search controller was on the navigation item.
The key solution is to remove safe area guide from your view controller and assign top bottom left right constraints to your tableview. It will be smooth like this
What you have done is correct. Did you try running your code in a device? Feels more like a glitch in the simulator. I tried what you tried and it works fine for me in the device. Whereas the glitch occurs in simulator.
Refer to this article. They have explained step by step process.
This is a known problem and your code seems fine. This problem was already discussed here.
Problem appears when you're using UIScrollView or its subclasses with large navigation titles. It doesn't work. Problem disappears when you use UICollectionViewController or UITableViewController instead.
I have a tableview, that is working fine. I have added a view to the top, so I can add some extra fields. I can't post images yet, so going to try and describe.
Navigation Bar
View
TableView
When I build it, it looks good.. However when I run or close the project and reopen I get this:
Navigation Bar
View
TableView
With the view taking up the complete page, pushing the TableView to the very bottom.
Any thoughts on why this is happening and how to fix it?? I can resize it back to the size I want using the size inspector, but it doesn't keep the value.
I have built a test project with the same screen layout and it works perfectly. I can't see what is different between the two projects is. Thanks
Yes, this was an auto layout problem.. After looking around the web, and trying various solutions I decided to use a view controller, and add my own tableview and tablefviewcell to that, along with my other labels and buttons. Once I built the methods the first time, I found this to be much cleaner solution, than attempting to mess around with the tableviewcontroller.
Just trying to teach myself storyboarding and have run into a question I was hoping people may have an answer to.
I wanted to create a reusable upper toolbar so that in case I ever had to change it, it would update all of my scenes. I created a sized ViewController in my storyboard. I then load it into a subview of each of my scenes using the menu's identifier. THat seems to work pretty well (although, feel free to tell me that's the wrong way to do it).
Here's where the problem starts. On that top toolbar, I have a UIButton which I connect to another sized ViewController in my storyboard as a popover. Basically, a drop down menu. If I just load up the top toolbar, works fine. If I connect just a regular button to that popover scene using a segue, that works too. If, however, I try to click the button and follow the segue while the toolbar is within a subView I crash with EXC_BAD_ACCESS. I presume I'm not allowed to spawn a popOver from a subView or follow a segue within a subview? The latter seems wrong since you effectively do that with any UI object.
How else should I handle this?
Thanks!
I'd recommend using a UINavigationController and setting the toolbar to include your UIButton (as a UIBarButtonItem). If you have any trouble "keeping track" of the toolbar or button you can subclass UINavigationController, add the UIButton (or entire toolbar) as a property of the subclass, and access it from any subsequent view through the self.navigationController property (might violate strict OO, but you could use a protocol).
As for the popover, I think you're OK on iPad but not on iPhone. There are custom projects on github to implement UIPopoverController, and indeed the Facebook app makes use of a custom popover for notifications in their app. iPhone raises an exception if you try to show a UIPopoverController.