ios - Best approach to cycle through background colors for collection cells in Swift? -
in swift, best approach loop through background colors cells in collection view? know if(indexpath.row % 2 == 0), putting logic in if clause seems clunky if there going more 2 color options.
my initial thought put list of colors in array , loop through them. possible loop through array in swift within cellforitematindexpath? there better approach looping through array of background colors?
Comments
Post a Comment