I am using MFMailcomposer for sending mail from my application in IPhone.It is all working fine,but when i port it to iPhone 5 and ios6 sometime
问题:
_serviceViewControllerReady:error: Error Domain=_UIViewServiceInterfaceErrorDomain Code=1 "The operation couldn’t be completed. (_UIViewServiceInterfaceErrorDomain error 1. but if i run again there is no problem it was working fine.
I am presenting the mail composer like this `
action
{Class mailClass =(NSClassFromString(@"MFMailComposeViewController"));if(mailClass !=nil){// We must always check whether the current device is configured for sending emailsif([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 recipientsNSArray*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];}
解决:
You should use : As presentModalViewController is deprecated in iOS 6.
I am using MFMailcomposer for sending mail from my application in IPhone.It is all working fine,but when i port it to iPhone 5 and ios6 sometime问题:_serviceViewControllerReady:error: Error Do