Instantiate from a Storyboard

suggest change
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];

With an Identifier:

Give the scene a Storyboard ID within the identity inspector of the storyboard.

Instantiate in code:

UIViewController *controller = [storyboard instantiateViewControllerWithIdentifier:@"myIdentifier"];

Instantiate an initial viewcontroller:

Within the storyboard select the view controller, then select the attribute inspector, check the “Is Initial View Controller” box.

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
UIViewController *controller = [storyboard instantiateInitialViewController];

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents