【发布时间】:2013-05-09 03:05:06
【问题描述】:
我正在尝试放置一个在下载过程中同步的进度条。 我的应用现在可以使用此代码下载文件...
pdfData = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:@"http://webaddress.com/pro/download/file.pdf"]];
NSString *resourcePDFPath = [[NSString alloc] initWithString:[[[[NSBundle mainBundle] resourcePath] stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"Documents"]];
pdfFilePath = [resourcePDFPath stringByAppendingPathComponent:@"myPDF.pdf"];
[pdfData writeToFile:pdfFilePath atomically:YES];
在这段代码的过程中,应用程序在下载过程中停止了,这是否正常? 现在我想要的是在下载的停止时间放置一个进度条。
我尝试查看我在网上找到的代码,但我有点困惑,我想我需要一个逐步解释清楚的参考。
【问题讨论】:
标签: ios objective-c download uiprogressview