With iOS7 tables has extended edges that lies under navigation bar, tabbar, etc. When I presenting UIPopoverController from one of cells of that table and set that table in the passthroughViews, it causes possible to tap on the cell under navigation bar, toolbar, tabbar, whatever! Even if bars are upper than tableview.
When I confronted this with UISearchBar, I've set up passthroughViews like that
#[self.searchBar, self.tableView]
(no matter that searchbar is in tableHeaderView) and everything was working fine (I thought). But now I know it's definitely an unexpected behaviour, possibly a bug in Cocoa Touch.
Have anyone solved this?
Related
When I scroll my TableView, it scrolls over my navigation bar (which I made without using the built in navigation bar for various reasons). See below:
Unscrolled:
Scrolled up:
How do I make it so that the TableView scrolls under the Navbar?
SOLVED:
I checked the "clips subviews" box for the table view to fix this problem.
To me, it looks like there may be an issue with your view hierarchy. Now, I assume that you built your own navigation bar by subclassing UINavigationBar.
In order to get the kind of behavior you need, you should have the following:
UIWindow's rootViewController is an instance of UINavigationController.
UINavigationController.navigationBar = your subclass of UINavigationBar.
UINavigationController.viewControllers[0] = UITableViewController
The UITableViewController.view = your UITableView
I am having a hard time adding a UISearchDisplayController to my app. The situation is this: The primary navigation in the app takes place by scrolling between UITableViewControllers whose table views are all subviews of a UIScrollView. Each of these has a UISearchDisplayController for searching the contents within each UITableView.
I also have a UIView outside of the UIScrollView which takes up the entire width of the screen and 85 pixels of the height, located at the very top of the interface. This acts as a kind of UINavigationBar, but due to the very custom nature of this element, I have made it a subclass of UIView.
My problem is that when you activate the UISearchBar, I want the "navigation bar" to move off the screen and the UISearchBar to take its place (like in the native Mail app where tapping the search field hides the navigation bar). It seems to me like I not only have to manually hide the "navigation bar" but also expand the size of the UIScrollView and all of its nested UITableViews in order to achieve this.
I am still a novice, so I am completely puzzled as to how to do this. Is there a simple solution or do I have to do this all manually and/or restructure my code in order to create the desired effect?
I have a ViewController nested inside a PageViewController which is also nested inside a NavigationViewController.
The thing is I have put a UISearchBar and UISearchDisplayController item on the center of my ViewController and for some reason, when I click on the search bar and the keyboard appears, the UISearchBar goes up to where the NavigationBar is. Also, when I click outside the UISearchBar, it dissapears with a fading effect.
Could someone explain to me what is going on? How can I fix the position of the UISearchBar so that it does not go up?
I tried a similar UISearchBar and UISearchDisplayController on an empty project with a single ViewController and the UISearchBar does not dissapear and does not move up. From this I believe that for some reason the UISearchBar moves up in the presence of a NavigationBar, which acts like a magnet.
I've got a UISearchDisplayController which displays search results in a UITableView that's right below it.
Everything works ok, I'm able to populate the tableview on the UISearchDisplayController, but when I scroll the tableview, the contents of the tableview are shown scrolling up behind the UISearchBar under the status bar of the device.
Has anyone got any experience of how to prevent this from being shown? All of my other view controllers I'm setting the navigation bar to have a specific colour, but on this search controller it doesn't take effect.
This is a known problem if you are using the UISearchDisplayController in a uipopover
I have the same problem and a lot of solutions provided by others do not work. I am actually quiet close to nailing it now. It is all about doing a notification to handle the keyboard hide and setting up the search results tableview content size
I've implemented a Popover that is composed of a UINavigationController that has a UITableViewController embedded. When the popover comes up, the navigation bar is cropped on the top and sides. I've attempted to use solutions I've read here with forcing the size - setting it to CGRectMake(0,0) then to the right size on ViewWillAppear and ViewDidAppear but it has no effect. The UINavigationController and UITableViewController have Size as Freeform in the Simulated Metrics (although I've tried Inferred, to no avail as well). I've tried setting the popover size to an explicit size, still no go. It ignores all of my attempts to make it look right.
What is the key to making a popover look good with a dynamic TableView?
TIA!
I've resolved this problem. I removed embedding of the UITableViewController in a UINavigationController and instead added a UINavigationBar to the header of the UITableView. The view appears correctly now with correct sizing of the navigation bar and buttons.