【问题标题】:ios open pdf in ibooks from DocumentsDirectoryios 从 DocumentsDirectory 在 ibooks 中打开 pdf
【发布时间】:2012-04-03 00:18:12
【问题描述】:

我正在尝试使用以下代码打开我生成并保存在我的文档目录中的 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 格式正确,因为我可以在预览中打开它。有人知道我在做什么错吗?看了很多教程,没有找到解决办法

【问题讨论】:

    标签: ios pdf uidocumentinteraction uti


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-12-08
      • 1970-01-01
      • 1970-01-01
      • 2014-04-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-23
      相关资源
      最近更新 更多