Introduction

Although Mac OS X provides many useful views and controls for creating user interfaces, there may be times when you need to extend the basic set to achieve an appearance or behavior that is more appropriate for your application. The problem with custom views is that you generally cannot see how they will look in your user interface until that part of your application is running. Even when your application is running, making changes to the attributes of custom views requires modifying your code and rebuilding your application before you can see those changes. For large applications, turning around such changes can be slow and frustrating. Luckily, Interface Builder provides a way for you to integrate custom controls into the Interface Builder environment, build those controls into your application’s user interface, and see the results immediately.

The infrastructure for integrating custom controls in Interface Builder version 3.0 has improved significantly over previous versions of the application. The current infrastructure makes it possible to integrate new controls quickly and add support for more advanced features, such as inspectors, in stages. The process for creating inspectors has also improved dramatically and lets you focus on the new attributes exposed by your custom objects.

You integrate controls through the use of plug-ins. Each plug-in provides Interface Builder with design-time information about one or more custom objects, including where to find them and how to change their attributes. Upon loading your plug-in, designers can then drag your custom controls from the Interface Builder library window and use them to build their interfaces. Your controls can also be saved in the resulting nib file and instantiated at runtime.

Organization of This Document

This document guides you through the process of creating plug-ins for use with Interface Builder version 3.0. The chapters in this book are intended to be read more or less in order. Early chapters provide basic information that all plug-in developers need to know, while later chapters provide more advanced topics.