简体   繁体   English

当从一个ViewController到另一个ViewController执行show segue时,导航栏消失了?

[英]Navigation bar disappears when show segue is executed from one ViewController to another?

I have a ViewController with a tableView in it and when I tap on a cell it performs a segue(show) from that view controller to another viewController with a navigationController embed in it. 我有一个带有tableView的ViewController,当我点击一个单元格时,它会执行从该视图控制器到另一个嵌入了NavigationController的viewController的segue(show)。 I have the segue going directly to the ViewController not the navigationController. 我的segue直接去ViewController而不是navigationController。 But when the segue executes, it brings me to the second viewController but the navigation bar that used to be there is gone. 但是当执行segue时,它将我带到第二个viewController,但是曾经在那里的导航栏不见了。 How do I fix this? 我该如何解决?

Your segue must be connected to the SecondViewController's NavigationController. 您的segue必须连接到SecondViewController的NavigationController。 Remake your segue connection from your FirstViewController to SecondViewController's NavigationContoller. 重新建立从FirstViewController到SecondViewController的NavigationContoller的segue连接。

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

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