Skip to content

Instantly share code, notes, and snippets.

@vincent178
Last active August 29, 2015 13:58
Show Gist options
  • Save vincent178/9972621 to your computer and use it in GitHub Desktop.
Save vincent178/9972621 to your computer and use it in GitHub Desktop.
segue between different storyboard
// Get the storyboard named secondStoryBoard from the main bundle:
UIStoryboard *secondStoryBoard = [UIStoryboard storyboardWithName:@"secondStoryBoard" bundle:nil];
// Load the initial view controller from the storyboard.
// Set this by selecting 'Is Initial View Controller' on the appropriate view controller in the storyboard.
UIViewController *theInitialViewController = [secondStoryBoard instantiateInitialViewController];
//
// **OR**
//
// Load the view controller with the identifier string myTabBar
// Change UIViewController to the appropriate class
UIViewController *theTabBar = (UIViewController *)[secondStoryBoard instantiateViewControllerWithIdentifier:@"myTabBar"];
// Then push the new view controller in the usual way:
[self.navigationController pushViewController:theTabBar animated:YES];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment