CocoaDev

Edit AllPages

Controller classes are very useful. It is in the class that you can link your interface widgets to the great coding you have done in other classes.

To create a controller class, go into Interface Builder. Click on the “Classes” tab of the “MainMenu.nib” window. Find NSObject and select it. Now hit the return key. This will create a subclass of NSObject. Name this whatever name you want to give your controller class. To be truely unique you might want to call it MyController.

Now save this class into Project Builder by doing this… HowToSaveAClassCreatedInInterfaceBuilderToProjectBuilder.

That is it.

Back to HowToProgramInOSX