0

I am downloading multiple files using ASIHTTP library in a cell and showing mutiple progresses and statuses like received bytes etc It was working fine but after alot of users pointing to that server something happens like statuses and progress bar not showing and some delays start occurring in response block of ASIHTTPRequest.Please help me out

Thanks in advance

1 Answers1

0

you just import all ASIHTTPRequest library and u need to use protocol file import when you use progress bar and use inbuilt method in bellow...

- (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(@"progress %f",val); }

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