Created
November 16, 2012 19:26
-
-
Save gfontenot/4090125 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
CGColorRef darkColor = [[UIColor colorWithRed:0.0 | |
green:0.0 | |
blue:0.0 | |
alpha: inverse ? (SHADOW_INVERSE_HEIGHT / SHADOW_HEIGHT) * 0.5 : 0.5 | |
] CGColor]; | |
CGColorRef lightColor = [[self.backgroundColor colorWithAlphaComponent:0.0] CGColor]; | |
newShadow.colors = [NSArray arrayWithObjects:(__bridge id)(inverse ? lightColor : darkColor), | |
(__bridge id)(inverse ? darkColor : lightColor), | |
nil]; |
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
UIColor *darkColor = [UIColor colorWithRed:0.0 | |
green:0.0 | |
blue:0.0 | |
alpha: inverse ? (SHADOW_INVERSE_HEIGHT / SHADOW_HEIGHT) * 0.5 : 0.5 | |
]; | |
UIColor *lightColor = [self.backgroundColor colorWithAlphaComponent:0.0]; | |
newShadow.colors = [NSArray arrayWithObjects:(id)(inverse ? [lightColor CGColor] : [darkColor CGColor]), | |
(id)(inverse ? [darkColor CGColor] : [lightColor CGColor]), | |
nil]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment