I seem to be having difficulties adding a mask via CALayers. I\'m simply trying to mask a UIImageView. Here\'s my code:
CALayer *maskLayer = [CALayer layer]; U
Try
maskLayer.contents = (id)mask.CGImage;
Yes, the cast sucks, but it's necessary.
I think you'll also need to say
maskLayer.bounds = (CGRect){CGPointZero, mask.size};