-(void) tableView:(UITableView *) tableView
willDisplayCell:(UITableViewCell *)cell
forRowAtIndexPath:(NSIndexPath *)indexPath {
if(indexPath.row % 2 ){
NSLog(@"inside alternate cells");
cell.backgroundColor =
[UIColor colorWithRed:147.0/255.0 green:160.0/255.0 blue:169.0/255.0 alpha:1.0];
}
}
your tableview will look like below:
of course i have customized cell according to my requirement.
Read my Objective C presentation at: Objective C for iPhone Development