Perform Segue Programmatically Without Button Connection?

Viewed 26277

I have two view controllers in my storyboard and I need to push from view 1 to view 2.

I need to do this without connecting a segue directly from a button in my storyboard, I need to do it programatically.

How can I?

Thanks.

3 Answers

Completely w/o segues

[self.navigationController pushViewController:[self.storyboard instantiateViewControllerWithIdentifier:@"YourViewControllerIDinStoryBoard"] animated:YES];
Related