CPKenburnsSlideshowView
CPKenburnsSlideshowView copied to clipboard
Insert CALayer in CPKenburnsSlideshowView
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];