下面是一些我的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