Question

I have a storyboard segue with an identifier that is 'Push to ResumeView'.

I try calling it in the ViewController that I'm in at the point, by doing

[self performSegueWithIdentifier: @"Push to ResumeView" sender: self];.

But nothing happens?

I'd much rather just push the ViewController using the top NavigationController or something, but I can't see how to do that either.

Was it helpful?

Solution

Try implementing the shouldPerformSegueWithIdentifier:sender: or prepareForSegue:sender: methods in the 'from' view controller. Put a break point or NSLog() inside the method to inspect the segue identifier. This will prove that you indeed set up the segue correctly in the storyboard.

If you want to manually push your next view controller to the top of the navigation controller, use pushViewController:animated:. However, if you are using storyboard, the preferred way is to use segues.

OTHER TIPS

Try this one.

UIViewController *yourResumeView=[self.storyboard instantiateViewControllerWithIdentifier:@"PushToResumeView"];
[self.navigationController pushViewController:yourResumeView animated:YES];
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top