Meaning of Warning quot;while a presentation is in progress!quot;(警告的含义“在演示过程中!)
问题描述
当我将 Instagram 集成到我的项目中时.我从 UIImagePickerController
得到一个 image
之后我想将它发送到 Instagram 但是当我发送 image
到 Instagram 通过 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.
这篇关于警告的含义“在演示过程中!"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:警告的含义“在演示过程中!"


基础教程推荐
- 如何使 UINavigationBar 背景透明? 2022-01-01
- 使用 Ryzen 处理器同时运行 WSL2 和 Android Studio 2022-01-01
- :hover 状态不会在 iOS 上结束 2022-01-01
- Android ViewPager:在 ViewPager 中更新屏幕外但缓存的片段 2022-01-01
- “让"到底是怎么回事?关键字在 Swift 中的作用? 2022-01-01
- 在 iOS 上默认是 char 签名还是 unsigned? 2022-01-01
- Android文本颜色不会改变颜色 2022-01-01
- LocationClient 与 LocationManager 2022-01-01
- 固定小数的Android Money Input 2022-01-01
- 如何使用 YouTube API V3? 2022-01-01