I have used CAShapeLayer for masking my image and i want to retrieve only the portion that i have masked. When i retrieve, i am getting only the full image.
Can anyone please provide me some code/information regarding this ?
CAShapeLayer *maskLayer = [CAShapeLayer layer];
maskLayer.frame = CGRectMake(0, 0, clippingPath.bounds.size.width, clippingPath.bounds.size.height) ;
maskLayer.path = [clippingPath CGPath];
maskLayer.fillColor = [[UIColor blackColor] CGColor];
maskLayer.backgroundColor = [[UIColor clearColor] CGColor];
[ imgView removeFromSuperview ] ;
imgView.layer.mask = maskLayer ;
Thanks in advance :)