简体   繁体   中英

Navigation Controller - Nav Bar not showing on children

I have view controller A and view controller B. A has a seque to B. A is embedded in a Navigation Controller.

The nav bar shows OK on A, however, it isn't showing on B. I'd expect to see see the nav bar and a "< Back" button. Here is my storyboard setup:

在此处输入图片说明

Is there something I have to do to get the nav bar to show up? Thanks!

So far, I assume the only reason that could let the navigation bar to be hidden is letting the kind of the segue to be not a Show . From the attached screenshot, it seems that your segue kind is Show Detail , if you would change it to Show it should be good.

Select the segue and then select the attributes inspector, change the "kind" option to: "Show (eg Push)":

在此处输入图片说明

and you should get the expected result.

Also

If you would like to know what's the difference between Show and Show Details segues, you might want to check: What are the differences between segues: “show”, “show detail”, “present modally”, “present as popover”?

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