Skip to content

Instantly share code, notes, and snippets.

@bad-mushroom
Created October 8, 2014 17:40
Show Gist options
  • Save bad-mushroom/f930540d1c50d6bf701d to your computer and use it in GitHub Desktop.
Save bad-mushroom/f930540d1c50d6bf701d to your computer and use it in GitHub Desktop.
Work with ViewControllers Programatically
// Present VC from Storyboard
// (include VC's header file)
UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"<STORYBOARD_NAME>" bundle:nil];
UIViewController *vc = [mainStoryboard instantiateViewControllerWithIdentifier:@"<STORYBOARD_ID"];
[self presentViewController:vc animated:FALSE completion:nil];
// Call Segue from Storyboard
[self performSegueWithIdentifier:@"<SEGUE_ID>" sender:self];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment