ExampleController.h

  1. /* ExampleController */
  2.  
  3. #import <Cocoa/Cocoa.h>
  4.  
  5. // Define our object as a subclass of NSObject
  6. @interface ExampleController : NSObject {
  7. // Instance variables go here.
  8. BOOL usesCustomResizeMode;
  9. NSString *title;
  10.  
  11. // IBOutlet means this ivar can be hooked up in Interface Builder.
  12. IBOutlet NSButton* okButton;
  13. }
  14.  
  15. /**
  16.  * Method declarations go down here.
  17.  */
  18.  
  19. // Prefixing the method declaration with a minus means it's an instance method.
  20. - (NSString *)setTitle:(NSString *)newTitle;
  21.  
  22. // Prefixing with a plus means it's a class method.
  23. + (ExampleController *)controllerWithSomething:(id)something;
  24.  
  25. // A return type of IBAction means it can be used as a target in Interface Builder.
  26. - (IBAction)processNow:(id)sender;
  27.  
  28. @end
  29.