2012-03-26 86 views
0

我想从服务器下载大尺寸zip文件用于此目的我正在使用ASIHTTPRequest.I已成功下载文件,但我想显示进度条。我已经实现它,就像ASIHTTPRequest的示例但我的进度条并未显示进度。我的代码是低于setDownloadProgressDelegate ASIHTTPRequest不工作​​

[networkQueue reset]; 
    networkQueue setRequestDidFinishSelector:@selector(imageFetchComplete:)]; 
[networkQueue setRequestDidFailSelector:@selector(imageFetchFailed:)]; 
    [networkQueue setDelegate:self]; 
    request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:fullURL]]; 
    fullPathTemp = [NSString stringWithFormat:@"%@/temp.zip", self.documentsDir]; 
    [request setDownloadProgressDelegate:progressIndicator]; 
    [request setDownloadDestinationPath:fullPathTemp]; 
    [request setUserInfo:[NSDictionary dictionaryWithObject:@"request1" forKey:@"name"]]; 
    [request setShouldContinueWhenAppEntersBackground:YES]; 
    [networkQueue addOperation:request]; 
    [networkQueue go]; 

感谢先进。

回答

-1

可能是你的progressIndicator没有设置委托。

+0

是的,我已经修复它谢谢 – 2012-04-26 08:25:27