Game Development Reference
In-Depth Information
Figure 2-13. Xcode configured for UI work
The other important feature of Figure 2-13 is the area on the right. It shows a graphic representation
of the UI components. On the header of Xcode, there are three buttons above the label View (A).
When working with Interface Builder, I find it helpful to deselect the left button and select the right
button. This will expose a view that shows the properties of the selected items under Objects. When
you are done configuring Xcode's UI, you should see something like Figure 2-13 .
Under the Objects section of Figure 2-10 , there is a single item named View (D). This View is a
UIView and will be the root view when the application is running. In the center of Figure 2-10 , you
can see how this view will look.
Under the section Placeholders, we see two items. We don't have to concern ourselves with the First
Responder at this point. We do, however, want to select File's Owner (B) and make a modification
to it. The File's Owner item is a reference to the object that loads this XIB file. In our case, it will be
an instance of ViewController_iPhone , as shown in Listing 2-2. To let Interface Builder know that
we intend to use a specific subclass of UIViewController , we enter the class name we want to use
on the right side, at item (C). In this way, Interface Builder will expose the IBOutlets of the class
ViewController_iPhone . We will explore more about IBOutlets shortly.
Search WWH ::




Custom Search