if (indexPath.row % 2 == 0) {
cell.backgroundColor = [UIColor magentaColor];
}else{
cell.backgroundColor = [UIColor whiteColor];
}
if (indexPath.row % 2 == 0) {
cell.backgroundColor = [UIColor magentaColor];
}else{
cell.backgroundColor = [UIColor whiteColor];
}
转载于:https://www.cnblogs.com/KiVen2015/p/7773166.html