简体   繁体   中英

How to connect a Navigation Controller in one storyboard to View Controllers in another storyboard?

Here is my Navigation controller that has one View Controller in the stack, but I have another storyboard with Viewcontrollers I want to add to the stack. I have the Views separated in order to better organize my Views and to have less views per Storyboard. How do I add Views from the referenced storyboard to the Navigation controller shown?

在此处输入图像描述

Right now I have the reference pointing to another Navigation controller in the second storyboard, but I wouldn't have a back arrow to the viewcontroller in the first Navigation Controller.

In the Storyboard A where you have a navigation controller add a Segue to Storyboard B (Settings) and make sure that you also write the View controller ID (MyViewControler) that you like from within Storyboard B in the Referenced ID

在此处输入图像描述

in Storyboard B (Settings) add a navigation controller and set the root view controller to the one that you like (MyViewControler) this navigation will be use only show the UI as it will be in the navigation controller from Storyboard A and will not be part of the navigation stack, This is because you add Referenced ID !!!

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