UISearchBar Above Navigation Bar
-
18-09-2019 - |
Question
All the applications I have ever seen, that use UINavigationBars, have the UINavigationBar right at the top of the app. If you want to use a UISearchBar then it's usually in the 'header' of the UITableView such as this...
addressbook http://www.freeimagehosting.net/uploads/d715f77301.png
What I would like to do is to put a UISearchBar object above/outside of the UINavigationBar/Controller, but i've been having some problems doing this.
genericnibfile http://www.freeimagehosting.net/uploads/f6025a02e5.png
Firstly, is what I want to achieve even possible? What would the easiest way to do this be?
Starting with the navigation based application seems to make the navigationbar/view un-resizeable!
Thanks,
Jon
Solution
So I re-thought my layout and design, and then realised I didn't have to include the search bar in the table view header. The table UISearchBar sits above the UITableView and doesn't scroll. Winner winner chicken dinner.
OTHER TIPS
You should be able to add the search bar and the navigation view to a root view/controller, and then manage the flow from there. Might end up in a complex flow though, so I'd only do this if that change in layout is really that important to you.