Adding a Scene to a Storyboard

Add a view controller to a storyboard to manage the display of a scene in your user interface. On iPhone and iPod Touch, a screen generally contains a single scene. On iPad, a screen can be composed of more than one scene.

To add a scene to a storyboard
  1. With a storyboard open, drag a view controller from the Object library to the storyboard canvas.

  2. Open the Identity inspector and set the view controller’s custom class.


You can add your custom view controller class to the project before you add the view controller to the storyboard. If you do so, Xcode adds the name of your custom class to the Class pop-up menu in the Identity inspector. Alternatively, you could design your entire application flow before creating any custom view controller classes.

After setting the view controller’s custom class, you can use the Attributes inspector to specify additional custom settings. For example, you can specify whether the view controller manages the initial scene in the storyboard.

After adding a view controller to a storyboard, you can proceed to lay out the scene. For example, you might add objects such as controls and text labels. In a table view, you might select the table view row style; you might also configure a custom row prototype. Make action and outlet connections by Control-dragging between an object and the view controller (icon in the scene dock) or your custom source code.