简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM