Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CAGradientLayer *gradient = [CAGradientLayer layer];
- gradient.frame = self.gradientView.bounds;
- gradient.colors = [NSArray arrayWithObjects:(id)[[UIColor clearColor] CGColor], [(id)[[UIColor blackColor] colorWithAlphaComponent:0.6] CGColor], nil];
- if (self.gradientView.layer.sublayers.count == 0) {
- [self.gradientView.layer insertSublayer:gradient atIndex:0];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement