Alternar color en celdas de tabla (Table Cell)

//Cambiar colores de las celdas para que esten una pares claras e impares oscuras - (void)tableView: (UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath: (NSIndexPath *)indexPath { if (indexPath.row %2 == 0) { cell.backgroundColor = UIColorFromRGB(alternateCellColor1); } else { cell.backgroundColor = UIColorFromRGB(alternateCellColor2); } }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.