Reputation: 5823
Touching the search bar in an apple app I am developing causes the navigation bar to be hidden.
Here are two screenshots to demonstrate:
When you tap on the search bar, it pushes the navigation bar up, off the top of the screen. How can I make it stay in place when clicking search?
Thanks!
Upvotes: 1
Views: 861
Reputation: 1767
One method is to prevent the searchBar from accessing the navigationBar - implement
- (UINavigationController *)navigationController {
return nil;
}
in the viewController assigned as the UISearchBar's delegate (or UISearchDisplayController's delegate).
If you still need to access the navigationController elsewhere in the controller, use
super.navigationController
in place of
self.navigationController
Upvotes: -1