MFMessageComposeViewController+BlocksKit.h 1.1 KB

123456789101112131415161718192021222324252627282930
  1. //
  2. // MFMessageComposeViewController+BlocksKit.h
  3. // BlocksKit
  4. //
  5. #import <MessageUI/MessageUI.h>
  6. /** MFMessageComposeViewController with block callback in addition to delegation.
  7. If you provide a completion handler to an instance of
  8. MFMessageComposeViewController but do not implement a delegate callback for
  9. messageComposeViewController:didFinishWithResult:error:, the message compose
  10. view 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 MFMessageComposeViewController is only available on a platform with MessageUI.
  14. */
  15. @interface MFMessageComposeViewController (BlocksKit)
  16. /** The block fired on the dismissal of the SMS composition interface.
  17. This block callback is an analog for the
  18. messageComposeViewController:didFinishWithResult: method
  19. of MFMessageComposeViewControllerDelegate.
  20. */
  21. @property (nonatomic, copy, setter = bk_setCompletionBlock:) void (^bk_completionBlock)(MFMessageComposeViewController *controller, MessageComposeResult result);
  22. @end