O'Reilly logo

Xcode® 4 by Richard Wentk

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7: Getting Started with Interface Builder

In This Chapter

Understanding nib files Getting started with IB Creating a simple iOS project with IB Comparing IB in Xcode 4 with Xcode 3

Although Interface Builder (IB) can be used as a UI editor, you must understand that it's a more general object management tool.

Understanding IB

In Xcode, IB has five functions:

bl.eps You can use IB to design your application's UI. The UI design includes one or more windows and views, with associated controls—objects such as buttons, sliders, text boxes, and so on. The design process presets the properties of these objects. For example, you can set the default position of an OS X window and control whether it has a drop shadow. Similarly, when you add a button to a UI, you use IB to set its position in the window or view, set its color, and so on. Optionally, you can define custom graphics and other more specialized features.

bl.eps You can use IB to pre-instantiate objects in your application. Any object you add to a nib file is created in memory when the file is loaded. This option is completely general: Objects do not have to be visible on screen or be part of a UI. The standard application templates for both iOS and OS X rely on this feature to load the core application classes.

You can use IB to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required