HTML5   发布时间:2022-04-27  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了iphone – MFmailcomposer有时会给出错误?大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在使用MFMailcomposer从IPhone中的应用程序发送邮件.它一切正常,但是当我将其移植到iPhone 5和ios6时

_serviceViewControllerReady:error:Error Domain = _UIViewserviceInterfaceErrorDomain Code = 1“操作无法完成(_UIViewserviceInterfaceErrorDomain错误1.但如果我再次运行没有问题,它是正常工作.

我正在呈现像这样的邮件作曲家

action
{
Class mailClass = (NSClassFromString(@"MFMailComposeViewController"));
    if (mailClass != nil)
    {
        // We must always check whether the current device is configured for sending emails
        if ([mailClass canSendMail])
        {
            [self displayComposerSheet];
        }
        else
        {
            [self launchMailAppOnDevice];
        }
    }
    else
    {
        [self launchMailAppOnDevice];
    }

}


void)displayComposerSheet 
{

    AppDelegate *appdelegate=[[UIApplication sharedApplication] delegate];
    MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
    picker.mailComposeDelegate = self;  

    [picker setSubject:@"report"];



    // Set up recipients
    NSArray *toRecipients=[NSArray arrayWithObject:@""]; 
    NSArray *ccRecipients =[[NSArray alloc]init];//= [NSArray arrayWithObjects:@"",@"",nil]; 
    NSArray *bccRecipients=[[NSArray alloc]init];// = [NSArray arrayWithObject:@""];    
    [picker setToRecipients:toRecipients];
    [picker setCcRecipients:ccRecipients];  
    [picker setBccRecipients:bccRecipients];    
    [picker setmessageBody:@"Please send me  Now." isHTML:YES];





    [appdelegate.navigationController presentModalViewController:picker animated:YES];
    [appdelegate.navigationController.navigationBar setHidden:NO];
    [picker release];
}

`

解决方法

我有同样的问题,它似乎是一个与特定UIAppearance定制相关的错误.当我删除我的UISearchBar背景图像的定制时,它完全消失了.

大佬总结

以上是大佬教程为你收集整理的iphone – MFmailcomposer有时会给出错误?全部内容,希望文章能够帮你解决iphone – MFmailcomposer有时会给出错误?所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。