gpt4 book ai didi

iPhone 3.0 WebView 滚动 PDF 错误 - [NSCFDictionary _absoluteLinkURL]

转载 作者:行者123 更新时间:2023-12-03 20:12:25 27 4
gpt4 key购买 nike

我有一个加载 PDF 文件的 WebView:

[myWebView loadRequest:[NSURLRequest requestWithURL:[NSURL 
fileURLWithPath:[[NSBundle mainBundle] pathForResource:fileName
ofType:@"pdf"]isDirectory:NO]]];

它在 iPhone OS 2.x 上工作正常,但在 iPhone 3.0 上,当我点击 PDF 进行滚动时,会出现此错误,并且应用程序崩溃:

-[NSCFDictionary _absoluteLinkURL]: unrecognized selector sent to instance 0x1c0230 Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFDictionary _absoluteLinkURL]: unrecognized selector sent to instance 0x1c0230'

最佳答案

试试这个:

NSString *urlAddress = [[NSBundle mainBundle] pathForResource:@"test" ofType:@"pdf"];
NSURL *url = [NSURL fileURLWithPath:urlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[webView loadRequest:requestObj];

关于iPhone 3.0 WebView 滚动 PDF 错误 - [NSCFDictionary _absoluteLinkURL],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1264517/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com