On a CAShapeLayer, I\'ve drawn a closed UIBezierPath. I can fill this shape by setting the fillColor, however I want to fill the shape wit
CAShapeLayer
UIBezierPath
fillColor
What you want is a mask. CAGradientlayer has a -setMask method that can clip it to the bounds of your shape like so:
[gradientLayer setMask:shapeLayer];