Created
November 8, 2014 19:01
-
-
Save pawurb/8a1cba564cca81ac6a23 to your computer and use it in GitHub Desktop.
colors changer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let colors = [UIColor.turquoiseColor(), | |
UIColor.greenSeaColor(), | |
UIColor.emerlandColor(), | |
UIColor.nephritisColor(), | |
UIColor.peterRiverColor(), | |
UIColor.belizeHoleColor(), | |
UIColor.amethystColor(), | |
UIColor.wisteriaColor(), | |
UIColor.midnightBlueColor(), | |
UIColor.sunflowerColor(), | |
UIColor.tangerineColor(), | |
UIColor.carrotColor(), | |
UIColor.pumpkinColor(), | |
UIColor.alizarinColor(), | |
UIColor.pomegranateColor(), | |
UIColor.cloudsColor(), | |
UIColor.silverColor(), | |
UIColor.concreteColor(), | |
UIColor.asbestosColor()] | |
override func touchesBegan(touches: NSSet, withEvent event: UIEvent) { | |
self.view.backgroundColor = colors[index] | |
println(index) | |
index++ | |
if(index == 20) { | |
index = 0 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment