iOS6 : MFMailComposeViewController is not displaying

标签 ios objective-c mfmailcomposeviewcontroller

MFMailComposeViewController 未在 ios6 中显示,而在 ios6 中运行相同的代码 我的代码是

   if ([MFMailComposeViewController canSendMail])
   {
       searchView.hidden=YES;
       MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
       picker.mailComposeDelegate = self;
       [picker setSubject:[NSString stringWithFormat:@"Query from ccc App"]];
       NSArray *toarr =[[NSArray alloc]initWithObjects:@"ccc-connections@ccc.edu", nil];
       [picker setToRecipients:toarr];
       [self presentModalViewController:picker animated:YES];          
   }

最佳答案

presentModalViewController:animated: 在 iOS 6.0 中已弃用。

改用 presentViewController:animated:completion:

关于iOS6 : MFMailComposeViewController is not displaying,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17189926/

相关文章:

iphone - 如何在应用程序 iphone 中添加 .vcf 文件作为附件

android - 为什么我的手机模拟的是宽屏分辨率

ios - Google AdMob GADBannerView 第一次请求需要很长时间并卡住 UI

iphone - 如何在 iphone 中通过电子邮件发送 .caf 文件?

iphone - MFMessageComposeViewController 自动关闭

ios - UITableviewCell 选择并移动到另一个 View

ios - 保存归因于解析的文本 (Swift)

iphone - 获取默认相册的访问权限

ios - 保留 Appdelegate

iphone - 为 CGContextRef 着色但保留 Alpha