【问题标题】:Warning: Attempt to present <MFMailComposeViewController: - Swift警告:尝试呈现 <MFMailComposeViewController: - Swift
【发布时间】:2016-06-21 03:11:21
【问题描述】:

这是我的问题。我有 MainViewController 和 MenuViewController。当我转到 MenuViewController 时,我可以在几个操作之间进行选择。其中之一是电子邮件编辑器。当我单击该按钮时,MenyViewController 消失,MainViewController 出现,然后我等待电子邮件视图控制器,但它没有显示。我收到此错误

Warning: Attempt to present <MFMailComposeViewController: 0x15f0ef000> on <app.MainViewController: 0x15e6d9090> while a presentation is in progress!

我明白为什么,但我无法解决它。我尝试使用 NSTimer 推迟电子邮件撰写视图控制器的演示,它可以工作。

【问题讨论】:

标签: swift email warnings


【解决方案1】:

遇到了类似的问题,重复的评论没有帮助,因为我无权访问以前的视图控制器,认为这可能对其他人有帮助。

(我在 Objective-C 中的解决方案)

dispatch_async(dispatch_get_main_queue(), ^ {
    //present view controller
});

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-11-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-01-07
    相关资源
    最近更新 更多