5

I've created an MFMailComposeViewController and am able to display it but once I press the cancel button, the cancel button and send button grey out and the action sheet does not appear. Is there anything I am missing?

MFMailComposeViewController *m = [[MFMailComposeViewController alloc] init];
[m setToRecipents:@[@"abc@example.com"]];
[m setSubject:@"Subject"];
[m setMessageBody:@"..." isHTML:YES];
[m setMailComposeDelegate:self];
[self presentViewController:m animated:YES completion:nil];

And here's a screenshot: Image showing greyed out buttonsSo is there something I'm missing or should I file a bug report?

Milo
  • 5,041
  • 7
  • 33
  • 59
  • 2
    Did you implement the MFMailComposeViewControllerDelegate protocol? For example, set the mailViewController.mailComposeDelegate = self if the current object implements the protocol then implement the required method - (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error { [self dismissViewControllerAnimated:YES completion:nil]; } – Dean Jun 21 '14 at 01:35
  • @deanware yes I did. That's not the issue, the issue is that the action sheet isn't showing. – Milo Jun 21 '14 at 01:39
  • @Milo, did you resolve this issue? I'm getting the same thing, and the code works in iOS 7 – jaseelder Aug 18 '14 at 14:44
  • @jaseelder It fixed itself and is currently working properly in the latest beta. – Milo Aug 20 '14 at 09:03
  • This question (my question) is now obsolete because it was about the beta version of iOS and the (then apparent) bug is fixed in the latest beta seed. – Milo Aug 20 '14 at 09:04

1 Answers1

0

Well i have found that in iOS8 SDk as MFMailComposeViewController is presented, the Finished event handler fires immediately and the the MFComposeResultEventArgs Result is set to MFMailComposeResult.Cancle.

This may be a bug.

Tanvi Jain
  • 917
  • 2
  • 7
  • 19