I added a mask to UIView's layer:
CGImageRef maskImageRef = [UIImage imageNamed:"Icon.png"].CGImage;
CALayer maskLayer = [CALayer layer];
maskLayer.contents = (__bridge id)maskImageRef;
self.layer.mask = maskLayer;
Then I use this code to get snapshot from a UIView:
[self.layer renderInContext:mainViewContentContext];
But the mask wasn't drawn.
How to draw self.layer with mask?
Special thx!