Reputation: 7360
I have a few UIElements in my UINvigationBar on the main screen of my iPad app. Namely a few buttons and a UISearchbar.
I would like these items to remain in the UINavigationBar when ever a I push a new ViewController onto the navigation stack. At the moment I am not really sure how to do with, without setting up the nav bar over and over on each new screen. Also i am not sure where I would put the search bar logic so that it works on any screen.
An excellent example of what I am trying to do can be seen on eBays current iPad app.
How do I keep a "static" UINavigationBar on an iPad app and would I use a base view controller for the search maybe?
Would appreciate any feedback on this!
Thanks!
Upvotes: 0
Views: 62
Reputation: 646
Create a subclass of UIViewController
that does all of the nav bar setup. Have all of your custom view controllers inherit from that view controller.
Upvotes: 1