【发布时间】:2011-07-18 16:46:29
【问题描述】:
我正在尝试设置 UITableViewCells 的单元格背景,但我正在为 UIAccessoryView 的背景颜色而苦苦挣扎。它不会改变。
谁能帮我让 UIAccessoryView 的背景颜色透明(或者实际上是任何其他颜色)?
这是我的代码
cell.textLabel.backgroundColor = [UIColor clearColor];
cell.accessoryView.backgroundColor = [UIColor clearColor];
cell.detailTextLabel.backgroundColor = [UIColor clearColor];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
if(indexPath.row % 2) {
cell.contentView.backgroundColor = [UIColor clearColor];
}
else {
cell.contentView.backgroundColor = [UIColor redColor];
}
这是说明问题的图片
【问题讨论】:
标签: iphone sdk uitableview accessoryview