Skip to content

Instantly share code, notes, and snippets.

Last active Feb 15, 2017
What would you like to do?
UIViewController navigation without segue or parent UINavigationController
// UIViewController nagivation without the navigation controller.
// UIStoryboard->UINavigationController
// Initializations
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
SecondViewController *svc = (SecondViewController *)[storyboard instantiateViewControllerWithIdentifier:@"identifierName"];
// Navigation
dispatch_async(dispatch_get_main_queue(), ^{
[self.navigationController pushViewController:svc animated:YES];
self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain
target:nil action:nil];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment