在我的應用程序中,我使用UIDocumentInteractionController將PDF文檔打開到acrobat reader(或任何其他查看器),但自iOS6以後它不再工作。UIDocumentInteractionController自iOS6以來無法工作
我已經嘗試了很多的東西,最後是從here:
UIDocumentInteractionController *docController = [[UIDocumentInteractionController alloc]init];
docController = [UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath:documentsDirectory]];
docControler.UTI = @"com.adobe.pdf";
docController.delegate = self;
CGrect navRect = self.view.frame;
[docController presentOpenInMenuFromRect:navRect inView:self.view animated:YES];
當此代碼運行時,我的應用程序完全凍結。 我試着用「presentOpenInMenuFromBarButtonItem」但我有同樣的問題。
不幸的是它不起作用。這似乎是一個彈出窗口打開,並立即在我的iPhone的左上角,以阻止我的應用程序......怪異 – 2013-04-08 14:33:31
而不是指定矩形,嘗試通過'CGRectZero'。 – daltonclaybrook 2013-04-08 14:39:25
同樣的問題,但我已經繞過這個問題,打開我的pdf到一個UIWebView。感謝您的幫助 – 2013-04-08 15:03:19