cha*_*shu 45 iphone objective-c uinavigationcontroller
当我在我的项目中整合Instagram时.我得到一个image从UIImagePickerController后它,我想将它发送到Instagram的但是当我发送image到Instagram的通过UIDocumentInteractionController委托方法presentOptionsMenuFromRect:inView: animated: 是这样
[documentInteractionController presentOptionsMenuFromRect:CGRectZero inView:self.view animated:YES];
Run Code Online (Sandbox Code Playgroud)
警告出现警告:在演示文稿正在进行时尝试显示<_UIDocumentActivityViewController:0x7584780>!
该应用程序不是崩溃.但我没有得到问题.为什么会出现此警告及其含义.我在互联网上搜索并阅读有关此问题,但没有得到任何答案.帮我 !!
Joh*_*rck 138
// 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];
}];
Run Code Online (Sandbox Code Playgroud)
上面代码的Swift 3版本看起来像这样:
// Breaks
viewController1.dismiss(animated: true)
present(viewController2, animated: true)
// Does not break
viewController1.dismiss(animated: true) {
present(viewController2, animated: true)
}
Run Code Online (Sandbox Code Playgroud)
请注意上面第二个示例中使用完成处理程序.
它只有viewController2在viewController1被完全解雇后才会出现.
对于那些需要/想要Swift 3版本的人,这里是
viewController1.dismiss(animated: true, completion: {
self.present(self.viewController1, animated: true)
})
Run Code Online (Sandbox Code Playgroud)
viewController1是要显示的视图控制器。
| 归档时间: |
|
| 查看次数: |
34083 次 |
| 最近记录: |