警告的含义“在演示文稿正在进行时!” [英] Meaning of Warning "while a presentation is in progress!"
问题描述
当我在我的项目中整合 Instagram 时。我从 UIImagePickerController
获得图片
,之后我想将其发送到 Instagram 但当我通过 Instagram 发送
委托方法 image
时,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)
}
注意在上面第二个例子中使用完成处理程序。
只显示 viewController2
viewController1
完全被解雇后。
Note the use of the completion handler in the second example above.
It only presents viewController2
after viewController1
has been fully dismissed.
这篇关于警告的含义“在演示文稿正在进行时!”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!