UITextField+RACSignalSupport.h 921 B

1234567891011121314151617181920212223242526272829303132
  1. //
  2. // UITextField+RACSignalSupport.h
  3. // ReactiveObjC
  4. //
  5. // Created by Josh Abernathy on 4/17/12.
  6. // Copyright (c) 2012 GitHub, Inc. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @class RACChannelTerminal<ValueType>;
  10. @class RACSignal<__covariant ValueType>;
  11. NS_ASSUME_NONNULL_BEGIN
  12. @interface UITextField (RACSignalSupport)
  13. /// Creates and returns a signal for the text of the field. It always starts with
  14. /// the current text. The signal sends next when the UIControlEventAllEditingEvents
  15. /// control event is fired on the control.
  16. - (RACSignal<NSString *> *)rac_textSignal;
  17. /// Creates a new RACChannel-based binding to the receiver.
  18. ///
  19. /// Returns a RACChannelTerminal that sends the receiver's text whenever the
  20. /// UIControlEventAllEditingEvents control event is fired, and sets the text
  21. /// to the values it receives.
  22. - (RACChannelTerminal<NSString *> *)rac_newTextChannel;
  23. @end
  24. NS_ASSUME_NONNULL_END