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

Popular posts from this blog

apache - setting document root in antoher partition on ubuntu -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -

Process 'command 'F:\android-sdk\build-tools\21.1.2\aapt.exe'' finished with non-zero exit value 1 -