Chapter 4. Interface Builder

Interface Builder, as its name implies, is a tool for building graphical user interfaces. You design interfaces by dragging windows, controls, and other elements into your interface and arranging them with your mouse. People often refer to this kind of tool as a WYSIWYG editor because What You See Is What You Get. Because you're already familiar with these techniques (moving files, sorting your email, and so on), it's easy to get started designing user interfaces in Interface Builder.

All your interface information is stored in a nib file. Nib files can describe the interface for an entire interface, or they can describe only a subset of an interface, such as a menu bar or window. As such, nib files are used by plug-ins (like System Preferences panes) as well as applications.

You can use Interface Builder design interfaces for both Carbon and Cocoa applications. Once your interface has been built, you can test the interface and make sure everything has been laid out correctly. Although the techniques involved are the same for either development library, Cocoa and Carbon interfaces differ in a number of key ways. In this chapter, you learn the fundamentals of using Interface Builder; you learn more about Cocoa- and Carbon-specific features in Chapters 8 and 9, respectively.

In this chapter you learn

  • How to build menus and controls

  • How to make windows resizable

  • How to use Interface Builder's Inspector to configure individual interface elements

  • How to test ...

Get Beginning Mac OS® X Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.