UITableView背景颜色设置
来源:互联网
tableView.backgroundColor = [UIColorgreenColor]改变整个tableView的颜色,对于tableViewCell,我们不应该直接使用cell.backgroundColor。Cell本身是一个UIView,我们所看到的部分其实只是它的一个Subview,也就是cell.contentView。所以,如果直接改变cell本身的背景色,依然会被cell.contentView给覆盖,没有效果。 tableView.backgroundColor = [UIColorgreenC