自定义tableviewcell imageview和附件视图的问题

时间:2011-09-30 07:58:51

标签: iphone uitableview

我正在使用自定义的tableviewcell并将图像视图添加到单元格。当我尝试将辅助披露指示符添加到该单元格时,附件视图的背景将变为灰色(默认情况下)。

请参阅此图片Cell

任何人都可以告诉解决方案吗?

2 个答案:

答案 0 :(得分:1)

tableView:willDisplayCell:forRowAtIndexPath:中设置单元格的背景颜色,例如:

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
        cell.backgroundColor = [UIColor blueColor];
}

答案 1 :(得分:0)

您可以设置默认颜色或所需的任何颜色:

cell.backgroundColor=[UIColor clearColor];

(或)

cell.backgroundColor=[UIColor blueColor];
相关问题