Following is the scenario for updating my progressview. My problem is that my last progressbar gets updated only .....
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 .
i Put UIProgressView in UITableViewCell dynamically.
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;
Updating progressview's progress in at end of cellForRowAtIndexPath like this ......
[NSTimer scheduledTimerWithTimeInterval:0.001f target:self selector:@selector(refreshProgress) userInfo:nil repeats:YES];
// 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