NSControl+RACCommandSupport.h 609 B

1234567891011121314151617181920212223
  1. //
  2. // NSControl+RACCommandSupport.h
  3. // ReactiveCocoa
  4. //
  5. // Created by Josh Abernathy on 3/3/12.
  6. // Copyright (c) 2012 GitHub, Inc. All rights reserved.
  7. //
  8. #import <Cocoa/Cocoa.h>
  9. @class RACCommand<__contravariant InputType>;
  10. @interface NSControl (RACCommandSupport)
  11. /// Sets the control's command. When the control is clicked, the command is
  12. /// executed with the sender of the event. The control's enabledness is bound
  13. /// to the command's `canExecute`.
  14. ///
  15. /// Note: this will reset the control's target and action.
  16. @property (nonatomic, strong) RACCommand<__kindof NSControl *> *rac_command;
  17. @end