NavigationController一个根和两个ViewController

时间:2018-07-30 12:48:41

标签: ios xcode uistoryboard uistoryboardsegue xcode-storyboard

我创建了MainViewController,它有两个按钮,可以说A buttonB button嵌入MainViewController到{{1} }至NavigationController,然后对show segueA button做同样的事情。当我按A按钮时,将出现带有导航栏的ViewController,但是出现B没有导航栏的ViewController。我在做什么错了?

1 个答案:

答案 0 :(得分:-2)

您可以让导航控制器推动视图控制器

navigationController?.pushViewController(BViewController(), animated: true)