UIDocumentInteractionController no longer works in iOS6

半世苍凉 提交于 2019-11-27 23:01:40

Just did some testing and found a solution. Do not present in the keyWindow.

[uidController presentOpenInMenuFromRect:navRect inView:self.view animated:YES];

I have tested this and it will fix the problem.

Another reason for the uidocumentinteraction controller not working in iOS6 is that the new action sheet/launch panel (it shows apps available to open the doc) is now used. My app which worked fine launching iBooks with iOS5 failed because I launched from viewDidLoad which was now too early and I got an error on the current view controller 'whose view is not in the window hierarchy' so I changed my code to performselector after delay of 1 second. The app now calls iBooks via the new panel.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!