以下是更新我的progressview的场景。 我的问题是我最后的进度仅获取更新.....动态更新UIProgressView的进度
的视图 - 控制是有按钮时开始接触从FTP服务器下载。 立即触摸导航到另一个视图控制器,其中uitableview显示正在进行不同的下载。
我把UIProgressView动态地放入UITableViewCell中。
我以这种方式实现它....
- //的cellForRowAtIndexPath //添加progressview在的cellForRowAtIndexPath 月底至小区
progressBar = [[UIProgressView alloc] initWithProgressViewStyle:UIProgressViewStyleBar]; progressBar.hidden=NO; progressBar.tag=123+indexPath.row; progressBar.frame = CGRectMake(250,170,350,25); progressBar.progress=0.0f;
更新progressview的进步像这样......
[NSTimer scheduledTimerWithTimeInterval:0.001f target:self selector:@selector(refreshProgress) userInfo:nil repeats:YES];
//执行刷新进度......
-(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]; }
如果任何人有解决方案请不要写这个主题
日Thnx在advnce 佩琪123
请提供一些关于tempArray的信息,它由 –