简体   繁体   English

使用导航控制器进行Segue查看

[英]Segue to view with Navigation Controller

My app has a walkthrough at the start of it. 我的应用程序在开始时会有一个演练。

It is VC1 -> VC2 -> VC3 with custom segues between each VC. 它是VC1-> VC2-> VC3,每个VC之间都有自定义选项。

The main view of my app is a series of view controllers with a navigation controller. 我的应用程序的主视图是一系列带有导航控制器的视图控制器。

Nav Controller (root view of) -> VC4 (Main) -> VC5 导航控制器(根视图)-> VC4(主)-> VC5

The app delegate determines whether the initial view controller is VC1 or the Nav Controller 应用程序委托确定初始视图控制器是VC1还是Nav控制器

My question is how do I segue (or push) from VC3 to VC4 and then have the navigation controller work so I can push via the navigation controller to VC5? 我的问题是我如何从VC3中选择(或推送)到VC4,然后使导航控制器工作,以便可以通过导航控制器将其推送到VC​​5? Once the app has segued to VC4 it will never need to go back to VC3. 一旦将应用程序设置为VC4,就不再需要回到VC3。

The nav bar is hidden in the entire app. 导航栏隐藏在整个应用程序中。

Cheers, 干杯,

Andy 安迪

Create a segue in between the view controllers, not linked to a button, and set their identifiers in storyboard to something different for each one. 在未链接到按钮的视图控制器之间创建序列,并将其在情节提要中的标识符设置为每个标识符都不相同。 You can then use this code to perform segues programmatically: 然后,您可以使用以下代码以编程方式执行segues:

[self performSegueWithIdentifier:@"YourIdentifier" sender:self];

Using this, you can control where and when the segues happen. 使用此功能,您可以控制发生segue的位置和时间。 From your question I can't exactly discern what it is you want to do, but I hope that this helps. 从你的问题,我不能准确地辨别什么是你想做的事,但我希望这会有所帮助。

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

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