views:

74

answers:

1

Hi everyone,

I'm writing an iOS app and I have set up some code for a CALayer named "Wheel" to animate (rotate) continuously which works great. I wish to mask this layer so only a small portion of it is visible, instead of the whole layer.

I added a mask using CALayer.mask but it too rotates as it's a sublayer of "Wheel". Is there any way I can mask the "Wheel" layer so it does what I expect, that is, only show a portion of this layer?

Thanks, Regards,

Jason

A: 

Can you just drop another layer in on top of it? In other words, add another layer to the wheel's superview, which will partially obscure the wheel? In that case you don't need to use CALayer.mask.

drewmca
Thanks for your reply. I'll check that out and see if it works.
Jason Wiggins