UITextField+RACSignalSupport.h 816 B

1234567891011121314151617181920212223242526272829
  1. //
  2. // UITextField+RACSignalSupport.h
  3. // ReactiveCocoa
  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;
  10. @class RACSignal;
  11. @interface UITextField (RACSignalSupport)
  12. /// Creates and returns a signal for the text of the field. It always starts with
  13. /// the current text. The signal sends next when the UIControlEventAllEditingEvents
  14. /// control event is fired on the control.
  15. - (RACSignal *)rac_textSignal;
  16. /// Creates a new RACChannel-based binding to the receiver.
  17. ///
  18. /// Returns a RACChannelTerminal that sends the receiver's text whenever the
  19. /// UIControlEventAllEditingEvents control event is fired, and sets the text
  20. /// to the values it receives.
  21. - (RACChannelTerminal *)rac_newTextChannel;
  22. @end