I change the background color of the UITableViewCells in the tableView:cellForRowAtIndexPath method
if(indexPath.row % 2 == 0){
cell.bac
Swift 5 and up
override func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
//Set Clear Backcolor
//cell.backgroundColor = .clear
//or in your case
if ( indexPath.row % 2 == 0 )
cell.backgroundColor = .orange
else
cell.backgroundColor = .red
}