我正在尝试使我的表格视图清晰。我用过
-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
cell.backgroundColor = [UIColor clearColor];
cell.contentView.backgroundColor = [UIColor clearColor];
}
但它什么也没做。我发现这是许多地方的解决方案,但它对我不起作用。我该怎么做呢?任何帮助表示赞赏。谢谢。
答案 0 :(得分:0)
还可以尝试:
self.tableView.backgroundColor = [UIColor clearColor];
答案 1 :(得分:0)
清除tableview背景颜色和单元格背景颜色
在ViewDidLoad中写:
self.tableView.backgroundColor = [UIColor clearColor];
和cellForRowAtIndexPath
创建单元格写入后
cell.backgroundColor = [UIColor clearColor];