有没有办法在 tableView
上为每个其他单元格着色一种颜色?我尝试查看我的 tableView
的属性,但没有找到任何内容。
我想要这样:
tableview
cell - white
cell - gray
cell - white
cell - gray
等...
最佳答案
一行代码,如果你想的话
cell.backgroundColor = indexPath.row % 2 == 0 ? .white : .gray
关于swift - TableView每隔一个单元格一种颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44604499/