Nib file

A nib file is a special type of resource file that you use to store the user interfaces of iOS and Mac OS X applications. A nib file is an Interface Builder document. You use Interface Builder to design the visual parts of your application—such as windows and views—and sometimes to configure nonvisual objects, such as the controller objects that your application uses to manage its windows and views. In effect, as you edit an Interface Builder document, you create an object graph that is then archived when you save the file. When you load the file, the object graph is unarchived.

The nib file—and hence the object graph—may contain placeholder objects that are used to refer to objects that live outside of the document but that may have references to objects in the document, or to which objects in the document may have references. A special placeholder is the File’s Owner.

At runtime, you load a nib file using the method loadNibNamed:owner: or a variant thereof. The File’s Owner is a placeholder in the nib file for the object that you pass as the owner parameter of that method. Whatever connections you establish to and from the File’s Owner in the nib file in Interface Builder are reestablished when you load the file at runtime.

Prerequisite Articles

Related Articles

Did this document help you? Yes It's good, but... Not helpful...


Last updated: 2010-08-03