2013-10-14 51 views
0

我正在一個單元格中使用ASIHTTP庫下載多個文件並顯示多個進度和狀態,如收到的字節等它工作正常,但大量用戶指向該服務器後,狀態和進度其棒沒有展示一些延誤ASIHTTPRequest.Please的響應塊開始出現幫我出正在下載狀態和進度條不顯示

在此先感謝

回答

0

你剛纔導入所有ASIHTTPRequest庫和u需要時使用進度條和使用使用協議文件導入內置方法波紋管...

- (void)viewDidLoad 
{ 
    [super viewDidLoad]; 
    NSString *[email protected]"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(@「progress%f」,val); }

-(void)setPersent:(float)val{ 
    lbl.text = [[NSString alloc] initWithFormat:@"%0.2f MB",val]; 
}