警告的含义“在演示过程中!"

Meaning of Warning quot;while a presentation is in progress!quot;(警告的含义“在演示过程中!)
本文介绍了警告的含义“在演示过程中!"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我将 Instagram 集成到我的项目中时.我从 UIImagePickerController 得到一个 image 之后我想将它发送到 Instagram 但是当我发送 imageInstagram 通过 UIDocumentInteractionController 委托方法 presentOptionsMenuFromRect:inView: animated: like this

When I am integarting the Instagram in my project. I am getting a image from UIImagePickerController and after it i want to send it to Instagram But when I am sending image to Instagram by UIDocumentInteractionController delegate method presentOptionsMenuFromRect:inView: animated: like this

[documentInteractionController presentOptionsMenuFromRect:CGRectZero inView:self.view animated:YES];

警告出现警告:在演示过程中尝试显示 <_UIDocumentActivityViewController: 0x7584780>!
应用程序没有崩溃.但我没有得到问题.为什么会出现这个警告以及它的含义.我在互联网上搜索并阅读了有关此的问题,但没有得到任何答案.帮帮我!!

The warning comes Warning: Attempt to present <_UIDocumentActivityViewController: 0x7584780> on while a presentation is in progress!
The application is not Crashing. But I am not getting the Problem. Why this warning comes and what It means. I searched on Internet and read questions about this but not got any answer. Help me !!

推荐答案

// Breaks
[viewController1 dismissViewControllerAnimated:YES completion:NULL];
[self presentViewController:viewController2 animated:YES completion:NULL];

// Does not break
[viewController1 dismissViewControllerAnimated:YES completion:^{
    [self presentViewController:viewController2 animated:YES completion:NULL];
}];

上述代码的 Swift 3 版本如下所示:

The Swift 3 version of the above code would look like this:

// Breaks
viewController1.dismiss(animated: true)
present(viewController2, animated: true)

// Does not break
viewController1.dismiss(animated: true) {
    present(viewController2, animated: true)
}

请注意上面第二个示例中完成处理程序的使用.
它仅在 viewController1 完全关闭后呈现 viewController2.

Note the use of the completion handler in the second example above.
It only presents viewController2 after viewController1 has been fully dismissed.

这篇关于警告的含义“在演示过程中!"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Pushing UIViewController above UITabBar(将UIView控制器推送到UITabBar上方)
How to stop UIBarButtonItem text from truncating?(如何阻止UIBarButtonItem文本被截断?)
java.lang.IllegalStateException: SimpleTypeImpl should not be created for error type(异常:不应为错误类型创建SimpleTypeImpl)
Android IllegalArgumentException: The tag for fragment_XXX is invalid. Received: layout-sw600dp/fragment_XXX_0(Android IlLegalArgumentException:Fragment_XXX的标签无效。收到:Layout-sw600dp/Fragment_XXX_0)
iOS convert audio sample rate from 16 kHz to 8 kHz(IOS将音频采样率从16 kHz转换为8 kHz)
Enforcing an audio sampling rate in iOS(在iOS中强制音频采样率)