if (indexPath.row % 2 == 0) {
cell.backgroundColor = [UIColor magentaColor];
}else{
cell.backgroundColor = [UIColor whiteColor];
}
iOS----------对单元格取余
原文:http://www.cnblogs.com/KiVen2015/p/7773166.html