Skip to content

Instantly share code, notes, and snippets.

@hvgotcodes
Created May 9, 2012 00:07
Show Gist options
  • Save hvgotcodes/2640609 to your computer and use it in GitHub Desktop.
Save hvgotcodes/2640609 to your computer and use it in GitHub Desktop.
i = 0
colors = ['yellow', 'red', 'white', 'blue', 'red']
for color in colors
do (color) =>
view = Ti.UI.createView
backgroundColor: color
top: 2
left: 2 + 42*i
height: 20,
width: 40
@.container.add view
i++
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment