Created
November 6, 2015 14:55
-
-
Save davo/8e1c2600d43ecc7ed131 to your computer and use it in GitHub Desktop.
Switch for ranges in Swift.
This file contains 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
switch temperatura { | |
case -20...20: | |
toColors = [ UIColor(rgba: "#4355D7").CGColor, UIColor(rgba: "#D930B9").CGColor] | |
default: | |
toColors = [ UIColor(rgba: "#1804D2").CGColor, UIColor(rgba: "#0091FF").CGColor] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment