【发布时间】:2011-10-16 22:32:28
【问题描述】:
我有以下简单的代码来在 web 视图中显示 pdf。我发现在 iOS 5 中,PDF 不会显示(显示为空白,底部有一个黑条)。我尝试了不同的 PDF,并通过在 Acrobat 中打开它来验证 PDF 是否正确。任何想法在 iOS5 中可能发生了什么变化?我也验证了路径是正确的。
它在 iOS 4.3 中正确显示
pathToPDF = [NSString stringWithFormat:@"%@/%@",[self getDocumentsPath], [chartDic objectForKey:@"PDFName"]];
NSURL *url = [NSURL fileURLWithPath:pathToPDF];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[webView loadRequest:request];
【问题讨论】:
标签: ios ipad pdf uiwebview ios5