- (
void)tableView:(
UITableView *)tableView willDisplayCell:(
UITableViewCell *)cell forRowAtIndexPath:(
NSIndexPath *)indexPath{
if(indexPath. row % 2 == 1){
[cell setBackgroundColor:[ UIColor yellowColor]];
}
else{//indexPath.row % 2 == 0
[cell setBackgroundColor:[ UIColor lightGrayColor]];
}
[cell setSelectedBackgroundView:[[ UIImageView alloc] initWithImage:[ UIImage imageNamed: @"cell_bg.png"]]];
}
if(indexPath. row % 2 == 1){
[cell setBackgroundColor:[ UIColor yellowColor]];
}
else{//indexPath.row % 2 == 0
[cell setBackgroundColor:[ UIColor lightGrayColor]];
}
[cell setSelectedBackgroundView:[[ UIImageView alloc] initWithImage:[ UIImage imageNamed: @"cell_bg.png"]]];
}