Created
March 5, 2014 10:57
-
-
Save KATT/9365131 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
// [..] | |
#define COLORGETTER(name, red, green, blue)\ | |
+ (instancetype) name##Color\ | |
{\ | |
static UIColor *color = nil;\ | |
static dispatch_once_t onceToken;\ | |
dispatch_once(&onceToken, ^{\ | |
color = RGB(red, green, blue);\ | |
});\ | |
return color;\ | |
} | |
// [..] | |
COLORGETTER(piglet, 237.0, 0.0, 130.0); // -> + (instancetype) pigletColor |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment