I have the following code that gets called in didSelectRowAtIndexPath. The issue is, when I click the cancel button, it prompts for save draft or discard. But when I click either, the view does not dismiss. I've used the same code in a pre iOS 5 app and it dismissed fine. Any ideas? I have the MFMailComposeViewController delegate protocol in the interface.
if (indexPath.row == 0)
{
if([MFMailComposeViewController canSendMail])
{
MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
picker.mailComposeDelegate = self;
[picker setSubject:@"Support"];
NSArray *toRecipients = [NSArray arrayWithObject:@"[email protected]"];
[picker setToRecipients:toRecipients];
NSString *emailBody = text;
[picker setMessageBody:emailBody isHTML:NO];
[self presentModalViewController:picker animated:YES];
}
}