当我尝试加载pdf却不知道为什么时,会收到此日志。

failed to find PDF header: `%PDF' not found.

她的我的代码:
- (void)viewDidLoad
{


    [webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://webdesign-schoenefeld.de/es-app/heute.pdf"]]];
    NSLog(@"---------------pdfloading....,------------------------");
    [webview addSubview:activityind];
    timer = [NSTimer scheduledTimerWithTimeInterval:(1.0/2.0)
                                             target:self
                                           selector:@selector(loading)
                                           userInfo:nil
                                            repeats:YES];
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.

}

我使用Xcode 6 Beta 5和iOS 8 beta 5。

谢谢你的帮助。

最佳答案

2014年9月9日更新:iOS8 GM解决了我正在使用的应用程序的此问题。

2014年9月9日之前的回应
Apple在iOS8 Beta 5发行说明中将其报告为已知错误。
https://developer.apple.com/library/prerelease/ios/releasenotes/General/RN-iOSSDK-8.0/
https://devforums.apple.com/message/1017919#1017919

我们应该等待下一个版本,看看它是否已修复。

关于ios - 找不到PDF header : `%PDF' not found,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/25158552/

10-14 22:22
查看更多