情况是要呈现 MFMailComposeViewController。我看到它已经完成了一半,但后来被解雇了。
这是错误:
_serviceViewControllerReady:error: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 “操作无法完成。(_UIViewServiceInterfaceErrorDomain error 3.)”
这是我展示 MFMailComposeViewController 的源代码:
-(void) MailExecute {
if ([MFMailComposeViewController canSendMail])
{
MFMailComposeViewController *mailViewController = [[MFMailComposeViewController alloc] init];
mailViewController.mailComposeDelegate = self;
[mailViewController setSubject:NSLocalizedString(@"Check this new look", @"")];
[mailViewController setMessageBody: @"my new look" isHTML:YES];
[self presentModalViewController:mailViewController animated:YES];
[mailViewController release];
}
else
{
UIAlertView *alertInternal = [[UIAlertView alloc]
initWithTitle: NSLocalizedString(@"Notification", @"")
message: NSLocalizedString(@"You have not configured your e-mail client.", @"")
delegate: nil
cancelButtonTitle:NSLocalizedString(@"OK", @"")
otherButtonTitles:nil];
[alertInternal show];
[alertInternal release];
}
}
奇怪的是,有时会发生,有时不会。请帮我解决这个问题!我花了将近 1 个工作日来解决这个问题,但没有成功。