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!
One method is to prevent the searchBar from accessing the navigationBar – implement
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
in place of