gpt4 book ai didi

ios - MFMailComposeViewController打开然后关闭

转载 作者:行者123 更新时间:2023-12-01 19:05:55 25 4
gpt4 key购买 nike

我有一个MFMailComposeViewController,我相信它已正确实现。但是,当它显示在屏幕上(通过模式显示)时,它只是打开,挂起一秒钟,然后关闭并记录MFMailComposeResultCancelled
有什么想法吗?

            if ([MFMailComposeViewController canSendMail]){
MFMailComposeViewController *composer = [[MFMailComposeViewController alloc] init];



if( composer == nil ){
UIAlertView* alert_view = [[UIAlertView alloc] initWithTitle:@"message"
message:@"You will need to setup a mail account on your device before you can send mail!"
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert_view show];
return;
}else{



composer.mailComposeDelegate = self;
[composer setSubject:@"I have an issue"];
[composer setMessageBody:@"" isHTML:NO];
[composer setToRecipients:@[@"email"]];
}


[self presentViewController:composer animated:YES completion:^{
;
}];

编辑在日志中找到了这些
Unbalanced calls to begin/end appearance transitions for <UINavigationController: 0xcda5e90>. The operation couldn’t be completed. (Cocoa error 4097.)

最佳答案

如果上拉MFMailComposer时UI发生任何更改,则调用MFMailComposeResultCancelled。

尽管您可以更改颜色,但我必须是默认的iOS导航标题。

关于ios - MFMailComposeViewController打开然后关闭,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19664784/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com