简体   繁体   中英

Is there a way to show UINavigationController in the second storyboard if that UINavigationController in the first storyboard?

I have the first storyboard has UINavigationController its continues to the second storyboard but it doesn't appear there only when running the app.

I link between storyboard by (Storyboard Reference)

The first storyboard

The second storyboard

The UINavigationController doesn't appear in the second storyboard its appear only when running the app.

according to navigation controllers property it will not show the navigation bar in your case , if you want to edit or customise navigation items or navigationbar then you have to make changes programatically .

but to make changes in navigationbar or navigation items there is some limitations sometimes you can't fully customise it and sometimes you customise it depend on your requirement ... :(

I suggest you that use navigation property but hide the navigation bar and on place of navigation bar (on top of every view controller) set a view which will look like navigation bar and you can easily customise it as per your requirement .

This is normal behaviour of the Storyboard as the controller in your second storyboard does not know if it is a controller in a navigation controller, hence it does not show the navigation bar. If yo want to show the navigation bar in the storyboard you can select it in the Simulated Metrics in the Attributes Inspector (shown here in that thread ). You can see it working by giving the controller a title for example.

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