I put the UIProgressView in a UITableViewCell, for example:
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"downloadcell"]; if(cell==nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"downloadcell"] autorelease]; UIProgressView* downPreView = [[UIProgressView alloc] initWithProgressViewStyle:UIProgressViewStyleDefault]; downPreView.tag = 123; downPreView.frame = CGRectMake(400,70, 200,10); [cell.contentView addSubview:downPreView]; }
When the download size has changed, I do this:
UIProgressView* downPreView = (UIProgressView*)[cell viewWithTag:123]; downPreView.progress = downloadPre;
but the appearance of downPreView will not change immediately, only after I touch a cell or another cell, so how do I immediately change a UIProgressView to a UITableViewCell?
ios cocoa-touch uikit uitableview uiprogressview
Tinyfool
source share