【发布时间】:2010-02-13 02:59:36
【问题描述】:
我正在为表格视图中的每个单元格添加一个 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];
【问题讨论】:
-
您可能希望看到how Tweetie does it(平滑滚动)。
标签: ios uitableview uilabel cornerradius