在应用程序包中,我有一个 PDF 文件,用作“用户指南”或手册。
-(void)loadManual
{
UIWebView *webPDF = [[UIWebView alloc] initWithFrame:self.view.frame];
webPDF.delegate = self;
webPDF.backgroundColor = [UIColor blackColor];
webPDF.opaque = YES;
[self.view addSubview:webPDF];
webPDF.center = self.view.center;
webPDF.tag = 88;
NSString *thePath = [[NSBundle mainBundle] pathForResource:@"manual" ofType:@"pdf"];
if (thePath) {
NSData *pdfData = [NSData dataWithContentsOfFile:thePath];
[webPDF loadData:pdfData MIMEType:@"application/pdf"
textEncodingName:@"utf-8" baseURL:nil];
}
}
问题:如何优雅地检查我的服务器是否有更新版本的“manual.pdf”,如果服务器上有更新版本,请下载并替换本地文件