简体   繁体   English

导航控制器-导航栏未显示在子项上

[英]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. 我有视图控制器A和视图控制器B。A与B有联系。A嵌入在导航控制器中。

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. 导航栏在A上显示“确定”,但是在B上未显示。我希望看到导航栏和“ <返回”按钮。 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 . 到目前为止,我认为可能会使导航栏隐藏的唯一原因是让segue的类型不是 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. 从所附的屏幕截图中,您的选择类型似乎是Show Detail ,如果您将其更改为Show it应该很好。

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”? 如果你想知道什么是之间的差异ShowShow Details塞格斯,你可能要检查: 什么是塞格斯之间的区别:“秀”,“秀细节”,“当前模态”,“存在酥料饼”?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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