我正在使用此代码从服务器下载 pdf 文件。
NSString *urlString = @"https://developer.apple.com/library/ios/documentation/uikit/reference/UILabel_Class/UILabel_Class.pdf";
NSURL *url = [NSURL URLWithString:urlString];
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
[request setDownloadDestinationPath:[[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"] stringByAppendingPathComponent:@"UILabel.pdf"]];
[request setDelegate:self];
[request startAsynchronous];
下载功能运行良好。但我需要用 CGPDFDocumentRef 显示下载的 pdf。
提前致谢。