views:

66

answers:

1

Hi All,

Is it possible to clip a CALayer to an arbitrary path? I am aware that I can clip to the superlayer's bounds, but in this case I need to be far more prescriptive.

TIA, Adam

+3  A: 

Use a CAShapeLayer as the mask for the layer you want to clip. CAShapeLayer has a path property that takes a CGPathRef.

Matt Long