I have run into an issue where having a UIProgressView as a subview of a UITableViewCell on iOS 7 makes the scrolling performance really poor. This issue doesn't really happen in iOS 6 or below and the scrolling is really great. I was wondering if I am missing something with the new UIProgressView or is it just a bug. I've seen the performance drop from like 50-60 fps to 30-40 fps when adding the UIProgressView on iOS 7. Here is some code that replicates this frame drop on iOS 7.
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
UIProgressView *progressView = [[UIProgressView alloc] initWithProgressViewStyle:UIProgressViewStyleDefault];
progressView.frame = CGRectMake(0, 0, cell.contentView.frame.size.width - 20, progressView.frame.size.height);
progressView.center = CGPointMake(cell.contentView.frame.size.width/2, cell.contentView.frame.size.height/2);
progressView.tag = 1;
[cell.contentView addSubview:progressView];
}
UIProgressView *progressView = (UIProgressView *)[cell.contentView viewWithTag:1];
[progressView setProgress:drand48()];
// Configure the cell...
return cell;}