Thursday, September 19, 2013

When you open the default storyboard, your workspace window should look similar to this:
../Art/storyboard_on_canvas.png
A storyboard contains scenes and segues. A scene represents a view controller, and a segue represents a transition between two scenes.
Because the Single View template provides one view controller, the storyboard in your app contains one scene and no segues. The arrow that points to the left side of the scene on the canvas is the initial scene indicator, which identifies the scene that should be loaded first when the app starts (typically, the initial scene is the same as the initial view controller).
The scene that you see on the canvas is named Hello World View Controller because it is managed by the HelloWorldViewController object. The Hello World View Controller scene consists of a few items that are displayed in the Xcode outline view (which is the pane that appears between the canvas and the project navigator). Right now, the view controller consists of the following items:
  • A first responder placeholder object (represented by an orange cube).
    The first responder is a dynamic placeholder that represents the object that should be the first to receive various events while the app is running. These events include editing-focus events (such as tapping a text field to bring up the keyboard), motion events (such as shaking the device), and action messages (such as the message a button sends when the user taps it), among others. You won’t be doing anything with the first responder in this tutorial.
  • The HelloWorldViewController object (represented by a pale rectangle inside a yellow sphere).
    When a storyboard loads a scene, it creates an instance of the view controller class that manages the scene.
  • A view, which is listed below the view controller (to reveal this view in the outline view, you might have to open the disclosure triangle next to Hello World View Controller).
    The white background of this view is what you saw when you ran the app in Simulator.
The area below the scene on the canvas is called the scene dock. Right now, the scene dock displays the view controller’s name (that is, Hello World View Controller). At other times, the scene dock can contain the icons that represent the first responder and the view controller object

No comments:

Post a Comment