Game Development Reference
In-Depth Information
Tip Technically speaking, an XIB file contains information that is used to create an instance of a
particular class. In practice, I find myself simply thinking, “the XIB file contains an object,” which is not
technically correct. Regardless of this inaccuracy, the terminology police have not arrested me—yet.
Now, we have covered what XIB files are and how the objects defined within them relate to objects
at runtime. The next step is to add content to our XIB files—specifically, UIViews for landscape and
portrait orientations.
Adding UI Elements to an XIB File
We have looked at the basic elements in an XIB file. We know there is a File's Owner object reference
that represents the UIViewController loading the XIB file. We also know that we have a root UIView
for the XIB file. We are going to add additional UIViews to our XIB file and look at how we customize
the application not only to support the different devices but also to have different layouts based on
orientation. Figure 2-14 shows the iPhone's XIB file with a few items added to it.
Figure 2-14. iPhone's XIB file partially configured
 
Search WWH ::




Custom Search