无法在UIWebView中看到pdf(该应用程序已获得Apple批准)

时间:2012-10-28 08:51:36

标签: pdf webview ios6

我的应用程序的一个功能是在UIWebView中显示PDF文件(来自应用程序包)。

在我的iPhone上它工作正常,但我有一些报告说在其他设备上没有显示PDF文件。

可能是什么问题?它可能与这些设备上的iOS版本有关吗?

这就是我在app中展示文件的方式:

NSString *pdfPath = [[NSBundle mainBundle] pathForResource:self.fileName ofType:@".pdf"];
if (!pdfPath) {
    Helper* h = [[Helper alloc]init];
    pdfPath = [h filesinADocumentFolder:self.fileName];
}

self.pdfUrl = [NSURL fileURLWithPath:pdfPath];
[self.webView1 loadRequest:[NSURLRequest requestWithURL:pdfUrl]];
[self.webView1 setBackgroundColor:[UIColor clearColor]];
[self.webView1 setOpaque:NO];

0 个答案:

没有答案