I know how to create IBOutlets in Xcode but how do you do it in Interface Builder?
A:
You don't create IBOutlets in IB, you connect IBOutlets to components
ennuikiller
2010-07-11 22:05:00
I know that you connect IBOutlets but you can also create them in Interface Builder.
Phenom
2010-07-11 22:32:43
+1
A:
Use the Classes tab in Interface Builder's Library window. This is new as of Interface Builder 3.2, introduced with Snow Leopard.
Chris Hanson
2010-07-11 22:08:42
I know how to do it that way but I'm talking about adding IBOutlets to an object that has already been moved into the document window.
Phenom
2010-07-11 22:33:33
The outlets and actions available for an object are associated with the class of the object, not the individual object itself. Really you're not *moving an object to* the document window, you're *instantiating a class in* the document window. It's a subtle but critical difference.
Chris Hanson
2010-07-11 22:47:08
So after the class in instantiated in the document window, how do I create additional IB outlets for it without having to edit the class file in XCode?
Phenom
2010-07-12 09:50:40
As I said above, you can select the class in the Classes tab of the Library window, then add your outlets and actions to the class there. Your new outlets and actions will show up on each instance of that class in the document. You will still have to edit the header file in Xcode too; Interface Builder won't automatically change your source code for you.
Chris Hanson
2010-07-12 22:44:39