简体   繁体   中英

Can we show more than one view with navigation bar having different controller as subview to another view?

Currently i am working on project in which i need to show multiple table view as a sub view to view (say view A). I have UIViewController as controller for view A. I created 3 more tableView (say view B, view C and view D). View B, View C and View D has there own controller. I want to show view B, view C and View D as subview of View A. and each subview will have their own navigation bar. I want to this without using .nib files and storyboard files.

I have seen one app in which they have did it.

Thank you in advance .....

In the controller for view A, create an instance of UINavigationController for each instance of your table view controllers (B, C and D). Set each table view controller as the root view controller of one of the navigation controllers.

Now add the navigation controllers views as subviews and add the navigation controllers as child view controllers.

Now your UI shows all of the tables, each with its own navigation bar.

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