Delete
Delete

Reputation: 922

Transitioning between multiple storyboards in XCode 4

I have not yet seen this question answered:

What is the best way to implement multiple storyboards in XCode 4? An example of when you would want to do this might be in a team environment where multiple people are working on subsections of the same UI.

Any ideas? I might guess it has to be done manually in code but it would be neat if there were a way to do it graphically within the Storyboard editing view.

Upvotes: 7

Views: 4592

Answers (2)

GSD
GSD

Reputation: 436

And if you want to navigate to a specific view controller then simply use UIViewController *testVC = [(storyboard instance) instantiateViewControllerWithIdentifier:@"(Viewcontroller name)"];

Upvotes: 1

craig
craig

Reputation: 201

Here is a link to an example of using multiple storyboards and how to programmatically link multiple Storyboards: http://www.skillmasters.net/main/?p=193

Here is the author's pertinent sample code:

UIStoryboard *settingsStoryboard = [UIStoryboard storyboardWithName:@"SettingsStoryboard" bundle:nil];
UIViewController *initialSettingsVC = [settingsStoryboard instantiateInitialViewController];
initialSettingsVC.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:initialSettingsVC animated:YES];

Upvotes: 10

Related Questions