I have a CAShapeLayer that i add a CAGradientLayer to, but there is no clipping about the shape of the CAShapeLayer.
A:
From your question it sounds more like you want to use a shape layer as a mask for a gradient layer. Create your CAShapeLayer adding a path to it. Then create a CAGradientLayer and set it's mask property. Then add your gradient layer to the layer hierarchy in your view.
[gradientLayer setMask:shapeLayer];
Matt Long
2010-08-30 20:00:10