Last active
August 4, 2016 09:26
-
-
Save chris-muller/dc2b33a57e8304c87d6e9eef1360f2c3 to your computer and use it in GitHub Desktop.
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
// Nice way of getting the conciseness | |
// benefits of using an enum when using | |
// non-literal values | |
enum Size { | |
case Large | |
case Medium | |
case Small | |
var value: CGSize { | |
switch self { | |
case .Large: | |
return CGSize(width: 2, height: 60) | |
case .Medium: | |
return CGSize(width: 2, height: 60) | |
case .Small: | |
return CGSize(width: 2, height: 60) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment