【发布时间】:2012-12-04 05:44:47
【问题描述】:
情况是 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 个工作日来解决这个问题,但没有成功。
【问题讨论】:
-
您的应用在设备或模拟器上时出现此异常?
-
很可能与 mailComposeView 无关,但通常与 UIView 相关:使用 quickLook 得到类似的错误说明。还在调试中...
-
嗨,JOM,您对此错误有什么新发现吗?
-
你添加MessageUI.framework了吗?
-
嘿,想知道你是否设法解决了这个问题。我也有这个问题,但只是在某些情况下,我无法重现它!
标签: objective-c ios mfmailcomposeviewcontroller mfmailcomposer