UIImagePickerController+RACSignalSupport.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. //
  2. // UIImagePickerController+RACSignalSupport.h
  3. // ReactiveCocoa
  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;
  11. @interface UIImagePickerController (RACSignalSupport)
  12. /// A delegate proxy which will be set as the receiver's delegate when any of the
  13. /// methods in this category are used.
  14. @property (nonatomic, strong, readonly) RACDelegateProxy *rac_delegateProxy;
  15. /// Creates a signal for every new selected image.
  16. ///
  17. /// When this method is invoked, the `rac_delegateProxy` will become the
  18. /// receiver's delegate. Any previous delegate will become the -[RACDelegateProxy
  19. /// rac_proxiedDelegate], so that it receives any messages that the proxy doesn't
  20. /// know how to handle. Setting the receiver's `delegate` afterward is considered
  21. /// undefined behavior.
  22. ///
  23. /// Returns a signal which will send the dictionary with info for the selected image.
  24. /// Caller is responsible for picker controller dismissal. The signal will complete
  25. /// itself when the receiver is deallocated or when user cancels selection.
  26. - (RACSignal *)rac_imageSelectedSignal;
  27. @end