Chapter 4. Interface Builder: Nibs and Windows
Interface Builder is a WYSIWYG tool that lets you lay out user interfaces in a simple, intuitive manner. The interfaces you create are stored in a file called a nib file, which your application can then access to create its windows, menus, and other elements. Interface Builder provides you with:
Palettes to add interface elements
Menus that help you align and lay out the interface
Info windows to set up the behavior of interface elements
You can do so much with Interface Builder that it will take a couple of chapters to explore its features. In this chapter you’ll:
Look at the components of a nib file
Check out what you can do with Info windows
Take a look at the types of windows you can create in Interface Builder
Use Interface Builder to modify a window
Then, you’ll look at palettes and layout tools in Chapter 5 where you’ll add controls to a window. In Chapter 7 you’ll take a close look at the default menu bar provided by Interface Builder.
A Carbon Nib File
In the last chapter you saw that when Project Builder creates a Carbon (nib based) application, it provides a file named main.nib and puts it in the Resources group of the project. As you recall, the nib file contains the application’s interface-based resources.
It’s an Interface Builder file (the “ib” in “nib” stands for Interface Builder) that contains descriptions of the interface elements in your application. These descriptions use Extensible Markup Language (XML).
Note
In ...
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