我有一个自定义单元格(不使用 xib),我正在尝试更改附件视图的背景颜色。这是我的代码和我尝试过的“
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
customCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellID" forIndexPath:indexPath];
cell.accessoryView.backgroundColor = [UIColor redColor];
return cell;
}
结果:
背景颜色没有改变。