UIActionSheet+RACSignalSupport.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. //
  2. // UIActionSheet+RACSignalSupport.h
  3. // ReactiveObjC
  4. //
  5. // Created by Dave Lee on 2013-06-22.
  6. // Copyright (c) 2013 GitHub, Inc. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @class RACDelegateProxy;
  10. @class RACSignal<__covariant ValueType>;
  11. NS_ASSUME_NONNULL_BEGIN
  12. @interface UIActionSheet (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 button clicks on 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 index of the specific button clicked.
  25. /// The signal will complete when the receiver is deallocated.
  26. - (RACSignal<NSNumber *> *)rac_buttonClickedSignal;
  27. @end
  28. NS_ASSUME_NONNULL_END