Uitableview 下载状态和进度条不显示
我在一个单元格中使用ASIHTTP库下载多个文件,并显示多个进度和状态,如收到的字节等。它工作正常,但在许多用户指向该服务器后,出现了一些情况,如状态和进度栏未显示,以及ASIHTTPRequest的响应块中开始出现一些延迟。请帮助我出去Uitableview 下载状态和进度条不显示,uitableview,asihttprequest,download,download-manager,Uitableview,Asihttprequest,Download,Download Manager,我在一个单元格中使用ASIHTTP库下载多个文件,并显示多个进度和状态,如收到的字节等。它工作正常,但在许多用户指向该服务器后,出现了一些情况,如状态和进度栏未显示,以及ASIHTTPRequest的响应块中开始出现一些延迟。请帮助我出去 提前感谢您只需导入所有ASIHTTPRequest库,当您使用进度条和下面的内置方法时,您需要使用协议文件导入 - (void)viewDidLoad { [super viewDidLoad]; NSString *url=@"http://
提前感谢您只需导入所有ASIHTTPRequest库,当您使用进度条和下面的内置方法时,您需要使用协议文件导入
- (void)viewDidLoad
{
[super viewDidLoad];
NSString *url=@"http://dulemba.com/Visits/Cover-GGCC(2mb).jpg";
proTo = [[protocol_file alloc]initWithURL:[NSURL URLWithString:url] delegate:self];
imageView=[[UIImageView alloc]initWithFrame:CGRectMake(0, 10, 300, 250)];
[self.view addSubview:imageView];
lbl=[[UILabel alloc]initWithFrame:CGRectMake(0, 250, 200, 100)];
[self.view addSubview:lbl];
lblPers=[[UILabel alloc]initWithFrame:CGRectMake(100, 250, 200, 100)];
[self.view addSubview:lblPers];
progressBar = [[UIProgressView alloc] initWithFrame:CGRectMake(0, 280, 300, 90)];
[self.view addSubview:progressBar];
}
-(void)imgDownload:(UIImage *)data{
imageView.image=data;
NSLog(@"image");}
-(void)setLblvalue:(float)val{
lblPers.text=[[NSString alloc]initWithFormat:@"%0.2f %%",val];
}
-(void)setProgValu:(float)val{
progressBar.progress=val;
//NSLog(@“进度%f”,val);
}
-(void)setPersent:(float)val{
lbl.text = [[NSString alloc] initWithFormat:@"%0.2f MB",val];
}