0

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

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];

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

4

1 回答 1

1

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

于 2012-04-02T16:18:12.520 回答