0

我刚刚将 backgroundColor 添加到我的单元格中,这发生了:

在此处输入图像描述

我只是想知道那两个乐队是怎么出现在我的牢房里的。我用来添加背景的代码是这样的:

-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{
    if (indexPath.row % 2) {
        [cell setBackgroundColor: [UIColor colorWithRed:48/255.0 green:83/255.0 blue:129/255.0 alpha:0.1]];
    }
}
4

0 回答 0