Skip to content

Instantly share code, notes, and snippets.

@birarda
Created May 17, 2012 19:09
Show Gist options
  • Save birarda/2721003 to your computer and use it in GitHub Desktop.
Save birarda/2721003 to your computer and use it in GitHub Desktop.
gradient
CAGradientLayer *gradient = [CAGradientLayer layer];
gradient.frame = shadowFrame;
gradient.colors = [NSArray arrayWithObjects:(id)[[UIColor colorWithRed:0.2 green:0.2 blue:0.2 alpha:1.0] CGColor],
(id)[[UIColor colorWithRed:0.2 green:0.2 blue:0.2 alpha:0.7] CGColor],
(id)[[UIColor colorWithRed:0.2 green:0.2 blue:0.2 alpha:0.0] CGColor],
nil];
gradient.locations = [NSArray arrayWithObjects:[NSNumber numberWithFloat:0.0], [NSNumber numberWithFloat:0.30], [NSNumber numberWithFloat:1.0], nil];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment