我正在尝试使用以下代码打开使用其他应用程序(如ibook)生成并保存在我的文档目录中的pdf:

NSLog(@"Send PDF: %@", _pdfPath);
NSURL *url = [NSURL fileURLWithPath:_pdfPath];
docController = [UIDocumentInteractionController interactionControllerWithURL:url];
docController.UTI=@"com.adobe.pdf";
BOOL isValid = [docController presentOpenInMenuFromBarButtonItem:sender animated:YES];


看来它必须能正常工作,但是当弹出窗口弹出ibook时,我有其他应用程序,但没有ibook。我知道PDF格式正确,因为我可以在预览中打开它。有人知道我在做什么错吗?我看过很多教程,但没有找到解决方案

最佳答案

您不需要UTI,如果已经安装了iBooks,它应该会出现在弹出菜单中,确定要安装iBooks吗?

09-25 22:25