Last active
August 29, 2015 13:58
-
-
Save vincent178/9972621 to your computer and use it in GitHub Desktop.
segue between different storyboard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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