ios - 导航 Controller - 导航栏未显示在 child 身上

标签 ios swift xcode

我有 View Controller A 和 View Controller B。A 具有 B 的序列。A 嵌入在导航 Controller 中。

导航栏在 A 上显示正常,但是在 B 上没有显示。我希望看到导航栏和“< 返回”按钮。这是我的 Storyboard设置:

enter image description here

我需要做什么才能显示导航栏吗?谢谢!

最佳答案

到目前为止,我认为可以隐藏导航栏的唯一原因是让 segue 的类型不是 Show。从所附的屏幕截图来看,您的segue类型似乎是Show Detail,如果您将其更改为Show应该会很好。

选择segue,然后选择属性检查器,将“kind”选项更改为:“Show (e.g. Push)”:

enter image description here

您应该会得到预期的结果。

还有

如果您想知道 ShowShow Details segues 之间的区别,您可能需要检查:What are the differences between segues: “show”, “show detail”, “present modally”, “present as popover”?

关于ios - 导航 Controller - 导航栏未显示在 child 身上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45873251/

相关文章:

ios - Storyboard需要更多时间来加载

php - 这是什么编码\u0641\u0648\u0627\u0632

IOS 应用程序崩溃,但没有可用的崩溃日志

ios - 在 dispatch_async 内部进行网络调用似乎不起作用?

ios - 使用未声明的标识符 'sqlStatement'

ios - 父 ViewController 如何知道其子 ViewController 何时被弹出?

ios - 应用程序在设备上崩溃但可以在模拟器 iOS 上运行

ios - Swift CollectionViewCell 自动高度

ios - Swift 设置内容压缩阻力

ios - 在 Game Center 比赛中出现错误 : cancelled by host