Class

UIStoryboard

An encapsulation of the design-time view controller graph represented in an Interface Builder storyboard resource file.

Declaration

@interface UIStoryboard : NSObject

Overview

A UIStoryboard object manages archived versions of your app's view controllers. At design time, you configure the content of your view controllers visually, and Xcode saves the data needed to recreate that interface in a storyboard file in your app's bundle. When you want to create a new view controller programmatically, first create a UIStoryboard object and specify the appropriate name and bundle information. Then use that object to instantiate the specific view controller that you want.

During the instantiation process, UIStoryboard creates your view controller programmatically using its initWithCoder: method. The storyboard passes the view controller's data archive to that method, which then uses the data to recreate the state of the view controller and its views. If you have a custom initialization method for your view controller, you can ask the storyboard to instantiate your view controller using a block you provide. You can use this block to call your custom initialization method, passing any extra data your view controller needs.

Topics

Getting a Storyboard Object

+ storyboardWithName:bundle:

Creates and returns a storyboard object for the specified resource file.

Loading the Initial View Controller

- instantiateInitialViewController

Creates the initial view controller and initializes it with the data from the storyboard.

- instantiateInitialViewControllerWithCreator:

Creates the initial view controller from the storyboard and initializes it using your custom initialization code.

Instantiating Storyboard View Controllers

- instantiateViewControllerWithIdentifier:

Creates the view controller with the specified identifier and initializes it with the data from the storyboard.

- instantiateViewControllerWithIdentifier:creator:

Creates the specified view controller from the storyboard and initializes it using your custom initialization code.

UIStoryboardViewControllerCreator

A handler block containing the custom initialization code for a view controller you instantiate from a storyboard.

Relationships

Inherits From

See Also

Storyboards

Customizing the Behavior of Segue-Based Presentations

Pass data between view controllers during a segue, and programmatically control when segues occur.

Dismissing a View Controller with an Unwind Segue

Configure an unwind segue in your storyboard file that dynamically chooses the most appropriate view controller to display next.

UIStoryboardSegue

An object that prepares for and performs the visual transition between two view controllers.

UIStoryboardUnwindSegueSource

An encapsulation of information about an unwind segue.

UIStoryboardViewControllerCreator

A handler block containing the custom initialization code for a view controller you instantiate from a storyboard.