Skip to content

Instantly share code, notes, and snippets.

@alvareztech
Created September 11, 2013 16:56
Show Gist options
  • Save alvareztech/6526522 to your computer and use it in GitHub Desktop.
Save alvareztech/6526522 to your computer and use it in GitHub Desktop.
iOS: Open and close with push event ViewController. (NavigationController required)
// Open
UIViewController *viewController = [self.storyboard instantiateViewControllerWithIdentifier:@"ViewControllerStoryboardID"];
// Or (but no use Storyboard)
CustomViewController *viewController = [[CustomViewController alloc] init]
[self.navigationController pushViewController:viewController animated:YES];
// Close
[self.navigationController popViewControllerAnimated:NO];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment