iphone - table Cell颜色不适用于披露指标

时间:2009-08-14 08:02:04

标签: iphone tableview indicator background-color disclosure

我有一个表格视图,其中有替代颜色作为单元格的背景颜色。 除此之外,我还添加了披露指示器附件。 然而,问题是细胞背景颜色似乎不适用于披露指示器“后面”的区域。在公开指示符出现在表格单元格的右端之前,单元格背景颜色似乎被截断。

1 个答案:

答案 0 :(得分:1)

我有类似的问题。这似乎是因为表中的每一行都分成几个部分。所以只更改cell.BackgroundColor不会改变整行的颜色。

尝试与此类似的东西..它对我有用:

UITableViewCell *bgView = [[UITableViewCell alloc] initWithFrame:CGRectZero];
    bgView.backgroundColor=indexPath.row % 2? [UIColor colorWithRed:0.95 green:0.95 blue:0.95 alpha:1]: [UIColor whiteColor];
    cell.backgroundView=bgView;