CPKenburnsSlideshowView icon indicating copy to clipboard operation
CPKenburnsSlideshowView copied to clipboard

Insert CALayer in CPKenburnsSlideshowView

Open brunoalano opened this issue 10 years ago • 0 comments

I'm trying to insert a gradient layer in the CPKenburnsSlideshowView. How can I do that? I'm trying with the following code:

UIColor *colorOne = [UIColor colorWithWhite:0.0 alpha:0.54f];
UIColor *colorTwo = [UIColor colorWithWhite:0.0 alpha:0.75f];
UIColor *colorThree = [UIColor colorWithWhite:0.0 alpha:0.92f];
CAGradientLayer *gradient = CAGradientLayer.layer;
gradient.frame = self.slideImageView.bounds;
gradient.colors = @[(id)colorOne.CGColor, (id)colorTwo.CGColor, (id)colorThree.CGColor];
[self.slideImageView.layer insertSublayer:gradient atIndex:0];

brunoalano avatar May 17 '14 03:05 brunoalano