我正在为我的表视图中的每个单元格添加一个UILabel。最初这没有任何问题。但是,当我使用 layer.cornerRadius
圆角化UILabel时,滚动表视图会变得很慢。
UILabel *label1 = [[UILabel alloc] initWithFrame:CGRectMake(cell.bounds.origin.x+10 ,5, 30, 30)];
label1.backgroundColor = ([[managedObject valueForKey:@"color"] hasPrefix:@"FFFFFF"]) ? [UIColor blackColor] : color;
label1.layer.cornerRadius = 10.0f;
[cell addSubview:label1];