目前MFMailComposeViewController从模式FormSheet在iPad上? [英] Present MFMailComposeViewController from modal FormSheet on iPad?
问题描述
有谁在iPad上的 UIModalPresentationStyleFormSheet
视图控制器中成功显示标准Apple MFMailComposeViewController
>
当我这样做时,视图会按预期显示,但是当用户点击任何输入文本视图时,例如主题,而键盘滑块按取消按钮将显示删除草稿&
如果我将模式视图更改为全屏模式,则可以正常工作。
我不认为你把它当作表单。使用这段代码为我创造奇迹:
MFMailComposeViewController * mailViewController = [[MFMailComposeViewController alloc] init];
mailViewController.mailComposeDelegate = self;
[mailViewController setSubject:@Subject];
[mailViewController setMessageBody:@isHTML:NO];
mailViewController.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentModalViewController:mailViewController animated:YES];
Has anyone been successful showing the standard Apple MFMailComposeViewController
from a UIModalPresentationStyleFormSheet
view controller on the iPad?
When I do this the view shows as expected but when the user taps any of the input text views, the subject for example, and the keyboard slides pressing the Cancel button will show the "Delete Draft" & "Save Draft" popover outside of the screen bounds.
If I change the modal view to full screen it works properly.
I don't think you are presenting it as a Form Sheet then. 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];
这篇关于目前MFMailComposeViewController从模式FormSheet在iPad上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!