Setting up views in Interface Builder

In the project navigator, find and select BNRDocument.xib. When you select a file in the project navigator that ends in .xib, Interface Builder opens in the editor area. Instead of code, you will see a layout grid displaying view objects defined in that XIB (XML Interface Builder document) file.

Right now, there are two view objects defined in BNRDocument.xib: a window and a text field. These are instances of NSWindow and NSTextField.

Figure 32.5  Current BNRDocument.xib contents

Current BNRDocument.xib contents

If you were to run this application now, a window would appear with the text Your document contents here ...

Get Objective-C Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.