Interface Builder
Because it is so graphically oriented, Aqua applications adhere to a very passive runtime model. In fact, a typical Mac OS X application spends most of its time running in an idle loop, waiting for some sort of user input, such as a keypress or a mouseclick onto one of its buttons. Through the Interface Builder application, you specify the onscreen controls that your application will have and tie these into handler methods within your code.
Interface Builder helps you generate
.nib
files, which are serialized versions of Cocoa application
elements. Typically, an application has one .nib
file for every window that its interface contains. A very
simple text-editing application, for example, might have one such
file for its document window (containing the text view in which the
user actually types), another for the application’s
Preferences window, and a third for its About panel. All but the most
minimal applications also contain a .nib that
holds its menu-bar menus (including its application menu and
everything to the right of it, as described in Section 1.4 in Chapter 1).
Through Interface Builder, you can build these windows by dragging template windows, controls, and views off of palettes, as shown in Figure 15-5. You can then establish connections between parts of the window and classes belonging to your application.

Figure 15-5. Building a window with Interface ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access