我正在使用 QLPreviewController 从我的服务器获取和查看远程 PDF。这非常有效,因为 Apple 在文件下载时内置了一个漂亮的“正在加载”图形。现在,我还想使用需要本地文件的 UIDocumentInteractionController。但是,由于 QLPreviewController 已经下载了该文件,我想使用它。
有没有办法获取 QLPreviewController 下载的文件的本地路径?
QLPreviewController *previewController = [[QLPreviewController alloc] init];
previewController.dataSource = self;
previewController.delegate = self;
previewController.currentPreviewItemIndex = 0;
[[self navigationController] pushViewController:previewController animated:YES];
[previewController release];
// Where is the file stored?