UIControl+RACSignalSupportPrivate.h 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. //
  2. // UIControl+RACSignalSupportPrivate.h
  3. // ReactiveObjC
  4. //
  5. // Created by Uri Baghin on 06/08/2013.
  6. // Copyright (c) 2013 GitHub, Inc. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @class RACChannelTerminal;
  10. NS_ASSUME_NONNULL_BEGIN
  11. @interface UIControl (RACSignalSupportPrivate)
  12. /// Adds a RACChannel-based interface to the receiver for the given
  13. /// UIControlEvents and exposes it.
  14. ///
  15. /// controlEvents - A mask of UIControlEvents on which to send new values.
  16. /// key - The key whose value should be read and set when a control
  17. /// event fires and when a value is sent to the
  18. /// RACChannelTerminal respectively.
  19. /// nilValue - The value to be assigned to the key when `nil` is sent to the
  20. /// RACChannelTerminal. This value can itself be nil.
  21. ///
  22. /// Returns a RACChannelTerminal which will send future values from the receiver,
  23. /// and update the receiver when values are sent to the terminal.
  24. - (RACChannelTerminal *)rac_channelForControlEvents:(UIControlEvents)controlEvents key:(NSString *)key nilValue:(nullable id)nilValue;
  25. @end
  26. NS_ASSUME_NONNULL_END