Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to properly combine a Tab Bar View and Navigation Bar in iOS

In my iOS application I have a tab bar view with three views. I would like each of those views to have a "navigation" bar at the top. I would like the navigation bar to have a left bar button item which has the same functionality across all three views, and then a right bar button item which is unique to each view. How should I build this?

like image 728
Groppe Avatar asked Jul 09 '12 09:07

Groppe


1 Answers

In each tab, put a UINavigationController. That's a separate one for each tab.

Set the root view controller of each navigation controller to a view controller that manages the content view you want to display.

You can set the left button item of each of the three navigation controllers to the same thing, and set the right button item to something different.

like image 165
Amy Worrall Avatar answered Sep 27 '22 22:09

Amy Worrall