1

Im going through Apple's OSX Cocoa (Your First Mac Application) tutorial and am up to refactoring the app delegate. I have created my own controller class.

I don't understand how to "Create an instance of the controller class in the nib file". I'm using Xcode 4.

Peter Hosey
  • 95,783
  • 15
  • 211
  • 370
dteoh
  • 5,794
  • 3
  • 27
  • 35

2 Answers2

2

Drag an 'Object' from the 'Object Library' in the right pane onto your nib. Next, select the object that you dragged into the nib, and then select the identity inspector (third icon from the left in the top right pane). From these, you can set a custom class. Set the class to be the custom controller that you have created. This will be created for you when the nib is initialized. You can then connect this to an IBOutlet in your AppDelegate (for that custom class).

dtuckernet
  • 7,817
  • 5
  • 39
  • 54
0

I think what you want is on the inspector, click the third tab, and for the "Custom Class", select your view controller.

enter image description here

mservidio
  • 12,817
  • 9
  • 58
  • 84