UIImagePickerController+RACSignalSupport.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. //
  2. // UIImagePickerController+RACSignalSupport.h
  3. // ReactiveObjC
  4. //
  5. // Created by Timur Kuchkarov on 28.03.14.
  6. // Copyright (c) 2014 GitHub. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @class RACDelegateProxy;
  10. @class RACSignal<__covariant ValueType>;
  11. NS_ASSUME_NONNULL_BEGIN
  12. @interface UIImagePickerController (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 every new selected image.
  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 considered
  22. /// undefined behavior.
  23. ///
  24. /// Returns a signal which will send the dictionary with info for the selected image.
  25. /// Caller is responsible for picker controller dismissal. The signal will complete
  26. /// itself when the receiver is deallocated or when user cancels selection.
  27. - (RACSignal<NSDictionary *> *)rac_imageSelectedSignal;
  28. @end
  29. NS_ASSUME_NONNULL_END