MFMailComposeViewController+BlocksKit.h 1.0 KB

123456789101112131415161718192021222324252627282930
  1. //
  2. // MFMailComposeViewController+BlocksKit.h
  3. // BlocksKit
  4. //
  5. #import <MessageUI/MessageUI.h>
  6. /** MFMailComposeViewController with block callbacks.
  7. If you provide a completion handler to an instance of
  8. MFMailComposeViewController but do not implement a delegate callback for
  9. mailComposeController:didFinishWithResult:error:, the mail compose view
  10. controller will automatically be dismissed if it was launched modally.
  11. Created by [Igor Evsukov](https://github.com/evsukov89) and contributed to
  12. BlocksKit.
  13. @warning MFMailComposeViewController is only available on a platform with MessageUI.
  14. */
  15. @interface MFMailComposeViewController (BlocksKit)
  16. /** The block fired on the dismissal of the mail composition interface.
  17. This block callback is an analog for the
  18. mailComposeController:didFinishWithResult:error:method
  19. of MFMailComposeViewControllerDelegate.
  20. */
  21. @property (nonatomic, copy, setter = bk_setCompletionBlock:) void (^bk_completionBlock)(MFMailComposeViewController *controller, MFMailComposeResult result, NSError *error);
  22. @end