May*_*ain 34 iphone objective-c ios uidocumentinteraction ios7
我在我的应用程序中实现了UIDocumentInteractionController,用于显示选项中的open.它在iOS8设备上运行良好,但在iOS7中我从邮件中打开我的PDF选项.当我关闭邮件编辑器时它会打开邮件编辑器,它也会从我的视图中删除一个菜单按钮(添加到窗口中).我花了一整天的时间来解决这个问题,但找不到任何解决方案.当我在其他选项中打开PDF时,没有问题.问题只出在邮件编辑器和iOS7上.我知道UIDocumentInterfaceController与iOS7有问题. 我在SO上发现了同样的问题,但这是一个快速查看的预览选项.
这是我打开选项的代码
[self.docInteractionController presentOptionsMenuFromRect:self.view.frame
inView:self.view
animated:YES];
Run Code Online (Sandbox Code Playgroud)
任何有关这方面的帮助将不胜感激.
提前致谢.
尝试一下这个,它可能有助于解决您的问题。
NSURL* url = //...Your URL //[NSURL fileURLWithPath:path];
UIDocumentInteractionController* docController = [UIDocumentInteractionController interactionControllerWithURL:url];
docController.delegate = self;
[docController presentPreviewAnimated:YES];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1041 次 |
| 最近记录: |