I have a requirement in which i need to crop the UIImage's top right and bottom right corner with specified radius. The final output shall look like below image's coreners
Can you any one please help me out?
I have a requirement in which i need to crop the UIImage's top right and bottom right corner with specified radius. The final output shall look like below image's coreners
Can you any one please help me out?
UIBezierPath *maskPath;
maskPath = [UIBezierPath bezierPathWithRoundedRect:_backgroundImageView.bounds byRoundingCorners:(UIRectCornerTopRight | UIRectCornerBottomRight)cornerRadii:CGSizeMake(5.0, 5.0)];
CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
maskLayer.frame = self.bounds;
maskLayer.path = maskPath.CGPath;
_backgroundImageView.layer.mask = maskLayer;
self
is my Custom table view Cell .
The simple way to do this
ImageView.layer.cornerRadius = 10.0f;
ImageView.layer.borderWidth = 1.0f;
ImageView.layer.borderColor = [[UIColor whiteColor] CGColor];
And cover the left side with equal background color . Then it'll be appear like right top and right bottom is cornered