Retired Document
Important: This document is targeted for Interface Builder version 3.0 and Xcode 3, which have been superseded by Xcode 4. To learn how to use Interface Builder in Xcode 4, see Designing User Interfaces in Xcode.
Introduction
Interface Builder is a visual design tool you use to create the user interfaces of your iOS and Mac OS X applications. Using the graphical environment of Interface Builder, you assemble windows, views, controls, menus, and other elements from a library of configurable objects. You arrange these items, set their attributes, establish connections between them, and then save them in a special type of resource file, called a nib file. (The term “nib” is historical and is an acronym for “NextSTEP Interface Builder.“) A nib file stores your objects, including their configuration and layout information, in a format that at runtime can be used to recreate the actual objects.
Who Should Read This Document?
This document discusses the features of Interface Builder 3.2 and also describes the nib file design process. User interface designers should read this document to learn how to use Interface Builder to create the desired look of their application. Programmers should also read this document to understand what program-level information needs to be created in Xcode.
Organization of This Document
This document contains the following chapters:
Interface Builder Quick Start gives you a quick tour of Interface Builder, including a hands-on tutorial.
Interface Builder Basic Concepts provides an overview of Interface Builder and the role of nib files in your applications.
Xcode Integration provides an overview of how nib files integrate with your Xcode projects.
Nib File Management shows you how to create and save nib files and how to work with them in your projects.
Nib Objects describes the types of objects you can add to nib files and when you might want to do so.
Interface Layout describes techniques for organizing window and view hierarchies and for adjusting the layout of individual objects.
Object Attributes describes the techniques for configuring the objects in your nib file with custom attributes.
Connections and Bindings describes the role of connections in nib files and how to configure outlets, actions, and bindings.
Testing and Validation describes the tools available for testing your nib file contents and ensuring your nib file works properly with your Xcode project.
Localization describes the tools and processes for localizing the contents of a nib file.
Interface Builder Customization describes the ways in which you can change the Interface Builder environment to suit your personal tastes.
Interface Builder Gesture Guide summarizes the keyboard and mouse actions you can use to make connections, execute commands, and so on.
The Glossary at the end contains a list of Interface Builder terms and their definitions.
Platform and Language Support
Although sometimes thought of as a tool for designing Cocoa application interfaces, Interface Builder lets you create nib files for both Objective-C and C-based applications in iOS and Mac OS X. All developers can take advantage of Interface Builder’s visual environment for assembling, laying out, and configuring windows and menus. If you are developing applications based on the AppKit or UIKit frameworks, you can also use Interface Builder to interconnect the objects in your nib file and application to facilitate the passing of messages. These connections reduce the amount of code that you need to write and, because they are made using Interface Builder, are easy to change later.
Interface Builder’s support for Cocoa in Mac OS X extends beyond just the Objective-C language. You can also use the Cocoa scripting bridge support to create interfaces for applications written using the Ruby or Python scripting languages. For more information about Interface Builder’s support for these languages, see Interface Builder Documents.
Most of the chapters in this book cover features that are common to the development of all types of applications. Chapters and sections that are specific to one development environment or another are called out as such.
Getting Interface Builder
Apple provides a comprehensive suite of developer tools (including Interface Builder) for creating iOS and Mac OS X software. The Xcode tools include applications to help you design, create, debug, and optimize your software. This suite also includes header files, sample code, and documentation for Apple technologies. You can download Xcode from the members area of the Apple Developer Connection (ADC) website (http://connect.apple.com/). Registration is required but free.
Reporting Bugs
If you encounter bugs in Apple software or documentation, you are encouraged to report them to Apple. You can also file enhancement requests to indicate features you would like to see in future revisions of a product or document. To file bugs or enhancement requests, go to the Bug Reporting page of the ADC website, which is at the following URL:
http://developer.apple.com/bugreporter/
You must have a valid ADC login name and password to file bugs. You can obtain a login name for free by following the instructions found on the Bug Reporting page.
See Also
For information on how to use nib files at runtime, including how to load them from your code, see Resource Programming Guide.
Copyright © 2011 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2011-03-08