Improve scrolling performance of list view

UIButton didn't need setMaskToBounds and it caused slow downs and stuttering when scrolling
This commit is contained in:
Andreas Linde 2012-10-20 22:42:03 +02:00
parent 10d6c72d95
commit 11a708d446

View File

@ -325,17 +325,16 @@
if (!cell) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier] autorelease];
}
cell.textLabel.font = [UIFont systemFontOfSize:14];
cell.textLabel.numberOfLines = 0;
cell.accessoryType = UITableViewCellAccessoryNone;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.textLabel.font = [UIFont systemFontOfSize:14];
cell.textLabel.numberOfLines = 0;
cell.accessoryType = UITableViewCellAccessoryNone;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
}
// button
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
button.autoresizingMask = UIViewAutoresizingFlexibleWidth;
[button.layer setMasksToBounds:YES];
[button.layer setCornerRadius:10.0f];
[button.layer setBorderWidth:1];
[button.layer setBackgroundColor:BUTTON_BACKGROUNDCOLOR.CGColor];