I have a custom view with a layerClass override like:
+ (Class) layerClass
{
return [CAShapeLayer class];
}
I want to be able to add a CGImage to the contents property like so:
- (void) animateView
{
UIImage *layerImage = ...;
CAShapeLayer *layer = (CAShapeLayer *)self.layer;
layer.contents = layerImage.CGImage;
//....Do other fun animations here
}
Are there other properties I need to set, or other ways to get the shape layer to render the contents of the image for animation?