Hai all am using CALayer to mask the UIImage, when i add the layer on imageview it display only layer portion hides remanning all image with white color filled
CALayer *mask = [CALayer layer];
mask.contents = (id)[[UIImage imageNamed:@"mask.png"] CGImage];
mask.frame = CGRectMake(0, 0, mainImageWidth+30, mainImageHeight);
mask.shadowOffset = CGSizeMake(0, 3);
mask.shadowOpacity = 1.5;
mainImageView.layer.mask = mask;
[mainImageView.layer setMasksToBounds:NO];
it hides my image view except the layer portion. how do i solve this
Instead of create mask using image view i have added three mask for UIView now its working perfect
Now its working fine.