UITextView+RACSignalSupport.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. //
  2. // UITextView+RACSignalSupport.h
  3. // ReactiveObjC
  4. //
  5. // Created by Cody Krieger on 5/18/12.
  6. // Copyright (c) 2012 Cody Krieger. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @class RACDelegateProxy;
  10. @class RACSignal<__covariant ValueType>;
  11. NS_ASSUME_NONNULL_BEGIN
  12. @interface UITextView (RACSignalSupport)
  13. /// A delegate proxy which will be set as the receiver's delegate when any of the
  14. /// methods in this category are used.
  15. @property (nonatomic, strong, readonly) RACDelegateProxy *rac_delegateProxy;
  16. /// Creates a signal for the text of the receiver.
  17. ///
  18. /// When this method is invoked, the `rac_delegateProxy` will become the
  19. /// receiver's delegate. Any previous delegate will become the -[RACDelegateProxy
  20. /// rac_proxiedDelegate], so that it receives any messages that the proxy doesn't
  21. /// know how to handle. Setting the receiver's `delegate` afterward is
  22. /// considered undefined behavior.
  23. ///
  24. /// Returns a signal which will send the current text upon subscription, then
  25. /// again whenever the receiver's text is changed. The signal will complete when
  26. /// the receiver is deallocated.
  27. - (RACSignal<NSString *> *)rac_textSignal;
  28. @end
  29. NS_ASSUME_NONNULL_END