I want to achieve the effect where one cell of the table view will have blue background, the next one will have white, the next one will have blue again, and then white and
please add the following code in the cellForRowAtIndexPath
if (indexPath.row % 2 == 0){ cell.backgroundColor =[UIColor blueColor]; } else { cell.backgroundColor =[UIColor whiteColor]; }
i think this will help you