Information Technology Reference
In-Depth Information
Integration within Xcode means that IB no longer runs as a separate application. This simplifies window
management—you no longer need to keep IB and Xcode windows organized on the same desktop—but it
means that the IB editor takes time to load when you use it for the first time.
Links now create supporting code features automatically, and you can drag links directly to a code win-
dow. This is a major improvement over Xcode 3, where creating outlets and actions was unnecessarily com-
plex, repetitive, and error-prone.
The Document window now appears as the icon column to the left of the editor area. You can expand
this column to show text labels, or you can leave it unexpanded to save space. You can drag links to objects
in either mode.
The Inspector panes are now embedded in the Utility area.
You no longer need to remember to save a nib file manually before building. Edited nib files are included
in the save dialog box. This is another major improvement.
If you prefer to keep code and nib files in separate floating windows, you can use the tab tear-off feature to float
the IB editor in one window while leaving the code editor in another. You can drag links between the two win-
dows in the usual way. But if you have a larger monitor, it's usually more productive to keep the IB editor and
the code editor in two split panes. With a very large monitor, you can have a three-way split with an IB file, a
class implementation, and a class header visible at the same time, creating links between them as needed. It's a
very productive option that was impossible in Xcode 3.
Summary
This chapter looked at Interface Builder in detail. It outlined the key features of nib files and explained how to
get started with the Inspectors and the object lists in IB.
It worked through a sample iOS project and explained how to add objects to a UI, how to set their external and
internal attributes and contents, and how to align them manually and automatically.
It introduced outlets and actions and demonstrated how to add them to a project and how to link them with
active code.
Finally, it sketched some of the features of the IB object hierarchy and summarized the key differences between
IB in Xcode 3 and Xcode 4.
Search WWH ::




Custom Search