下面是一些我的cellForRowAtIndexPath如何设置表格单元格文本标签的背景颜色
- (UITableViewCell *)tableView:(UITableView *)tv cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
...
cell.textLabel.textAlignment = UITextAlignmentRight;
cell.contentView.backgroundColor = [UIColor orangeColor];
cell.textLabel.textColor = [UIColor blueColor];
cell.textLabel.backgroundColor = [UIColor orangeColor];
cell.textLabel.text = @"text";
return cell;
}
的,因为它在Interface Builder的定义我的标签的文本颜色将变为蓝色,但是它的背景色撑!我如何定制它?
号这表明公司在IB定义标签的背景,单元格的内容视图的不是背景的最后的地方。谢谢。 – jkally 2011-03-29 17:25:11