简体   繁体   中英

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.

The main view of my app is a series of view controllers with a navigation controller.

Nav Controller (root view of) -> VC4 (Main) -> VC5

The app delegate determines whether the initial view controller is VC1 or the Nav Controller

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? Once the app has segued to VC4 it will never need to go back to 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:

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

Using this, you can control where and when the segues happen. From your question I can't exactly discern what it is you want to do, but I hope that this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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