【发布时间】:2014-06-21 01:19:56
【问题描述】:
我创建了一个 MFMailComposeViewController 并且能够显示它,但是一旦我按下取消按钮,取消按钮和发送按钮就会变灰并且操作表不会出现。我有什么遗漏吗?
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];
这是一个屏幕截图: 那么我有什么遗漏或者我应该提交错误报告吗?
【问题讨论】:
-
你实现了 MFMailComposeViewControllerDelegate 协议吗?例如,如果当前对象实现协议,则设置 mailViewController.mailComposeDelegate = self 然后实现所需的方法 - (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error { [self dismissViewControllerAnimated :YES 完成:nil]; }
-
@deanware 是的,我做到了。这不是问题,问题是操作表没有显示。
-
@Milo,你解决了这个问题吗?我得到了同样的东西,代码在 iOS 7 中工作
-
@jaseelder 它已自行修复,目前在最新的测试版中正常工作。
-
这个问题(我的问题)现在已经过时了,因为它是关于 iOS 的 Beta 版,并且(当时明显的)错误已在最新的 beta 种子中修复。
标签: ios ios8 mfmailcomposer cancel-button