how to set different background colors for cells in a UITableView (specifically rainbow color for seven cells)
You can set it like so:
cell.contentView.backgroundColor = [UIColor colorWithRed:249.0/255 green:237.0/255 blue:224.0/255 alpha:1.0];
You may arrive at the conclusion that 'willDisplayCell' is still not working like I did at first. The reason it didn't work for me initially was because I wasn't using colors properly.
Don't forget that when using custom colors you need to divide by 255.0f:
[UIColor colorWithRed:44/255.0f green:50/255.0f blue:65/255.0f alpha:1];
Something like the following will result to a white cell:
//DON'T DO
[UIColor colorWithRed:44 green:50 blue:65 alpha:1];
making it look like it's not doing anything when it really is setting the background to white.