Current MFMailComposeViewController from modal FormSheet on iPad?

Has anyone successfully shown a standard Apple MFMailComposeViewControllerfrom a display controller UIModalPresentationStyleFormSheeton an iPad?

When I do this, the view is displayed as expected, but when the user selects any of the input text views, the subject, for example, and the keyboard slides by clicking the "Cancel" button, will display "Delete draft" and "Save draft" outside the borders of the screen .

If I change the modal view in full screen, it works correctly.

+3
source share
1 answer

I do not think that you represent it as a sheet of form. Using this code works wonders for me:

MFMailComposeViewController *mailViewController = [[MFMailComposeViewController alloc] init];

mailViewController.mailComposeDelegate = self;
[mailViewController setSubject:@"Subject"];
[mailViewController setMessageBody:@"" isHTML:NO];
mailViewController.modalPresentationStyle = UIModalPresentationFormSheet;

[self presentModalViewController:mailViewController animated:YES];
+7
source

All Articles