Creating and Connecting an Outlet
- Steps
With a nib file open, click the Assistant button.
In the jump bar, select the header file in which you want to declare a new outlet.
Control-drag from a nib object to the location in the header file for the new outlet.
In the dialog, choose Outlet from the Connection menu.
Type the name of the new outlet and click Connect.

Connect an object directly to the declaration of a new outlet in a source file.
As you Control-drag from an object to your source code, Interface Builder indicates where a new outlet is valid. After you enter the name of the outlet, Interface Builder declares the outlet for you and connects the object to it. You can choose to make the outlet an instance variable or a property.
You may need to add source code that uses the outlet. You can Option-click the name of your controller's implementation file in the source editor’s jump bar to open the implementation file alongside the header file.
The video shows connecting an NSMatrix object to a property outlet in a window controller class.
© 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-09-19)