UISwitch+RACSignalSupport.h 641 B

1234567891011121314151617181920212223242526
  1. //
  2. // UISwitch+RACSignalSupport.h
  3. // ReactiveObjC
  4. //
  5. // Created by Uri Baghin on 20/07/2013.
  6. // Copyright (c) 2013 GitHub, Inc. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @class RACChannelTerminal<ValueType>;
  10. NS_ASSUME_NONNULL_BEGIN
  11. @interface UISwitch (RACSignalSupport)
  12. /// Creates a new RACChannel-based binding to the receiver.
  13. ///
  14. /// Returns a RACChannelTerminal that sends whether the receiver is on whenever
  15. /// the UIControlEventValueChanged control event is fired, and sets it on or off
  16. /// when it receives @YES or @NO respectively.
  17. - (RACChannelTerminal<NSNumber *> *)rac_newOnChannel;
  18. @end
  19. NS_ASSUME_NONNULL_END