UIStoryboard Authentication

How do you identify a UIStoryboard?

The class has methods that create and create an instance, but I don't see @property with something like name . For instance.

Getting the storyboard object

 + storyboardWithName:bundle: 

Creating storyboard dispatcher instances

 – instantiateInitialViewController – instantiateViewControllerWithIdentifier: 

Any suggestions?

==== UPDATE

I was hoping for something like self.storyboard.name or [self.storyboard description] , for example:

 NSLog(@"This Storyboard is: %@", self.storyboard.name); 

Perhaps this does not mean.

+6
source share
1 answer

You can define a storyboard by its name in the project navigator:

enter image description here

You can define the view controller from the storyboard by setting your storyboard identifier in the identity inspector in the interface constructor:

enter image description here

After that, you can access them through your code:

 UIStoryboard *iPhoneStoryboard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" bundle:nil]; ViewController *firstViewController = [iPhoneStoryboard instantiateViewControllerWithIdentifier:@"FirstViewController"]; 
+3
source

All Articles