0
votes

Following is the scenario for updating my progressview. My problem is that my last progressbar gets updated only .....

  1. The viewcontroller is having button when touched starts download from ftp server. when immediately touched navigates to another view controller where uitableview is showing the different download in progress .

  2. i Put UIProgressView in UITableViewCell dynamically.

  3. I am implementing it in this way....

    -- // cellForRowAtIndexPath // adding progressview to cell

    progressBar = [[UIProgressView alloc] initWithProgressViewStyle:UIProgressViewStyleBar];
    progressBar.hidden=NO;
    progressBar.tag=123+indexPath.row;
    progressBar.frame = CGRectMake(250,170,350,25);
    progressBar.progress=0.0f;
    
  4. Updating progressview's progress in at end of cellForRowAtIndexPath like this ......

       [NSTimer scheduledTimerWithTimeInterval:0.001f target:self selector:@selector(refreshProgress) userInfo:nil repeats:YES];
    
  5. // implementation of refresh progress......

        -(void)refreshProgress
        {
    
    UITableViewCell *cell=(UITableViewCell *)[tempArray objectAtIndex:1];
    NSString * int_index=[tempArray objectAtIndex:0];
    FTPManager *objFTPMgr = [[FTPManager alloc] init];
    int index1=[int_index intValue];
    UIProgressView *prgView=(UIProgressView *)[cell viewWithTag:index1];
    prgView.progress = [objFTPMgr putProgress];
    [objFTPMgr release];
    [prgView reloadInputViews];
        }
    

    If any one has solution please do write to this thread

Thnx in advnce Paggy 123

1
Please provide some more info about tempArray and what it consist ofThe iOSDev

1 Answers

0
votes

I don't know how many progresviews you have, but with the method refresProgress, you only call the progress view of the cell of tempArray[1];

You have to subclass a UITableViewCell,and make a method in there with a refreshProgresbar. Then you can loop through the current cells and do a refresh.