Is there a way to set cornerRadius for only bottom-left,bottom-right and top-left corner of a UIView?
I tried the following, but it ended up making the view disappea
hope this will help you
your above code running perfectly on my machine , may be you set CAShapeLayer
frame equal to your view frame due to which your view will disappear but i am not seeing this line in your code ,so please check your view property and apply below code
UIBezierPath *maskPath;
maskPath = [UIBezierPath bezierPathWithRoundedRect:viewName.bounds
byRoundingCorners:(UIRectCornerBottomLeft | UIRectCornerBottomRight |UIRectCornerTopLeft)
cornerRadii:CGSizeMake(20.0, 20.0)];
CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
maskLayer.frame =viewName.bounds;
maskLayer.path = maskPath.CGPath;
viewName.layer.mask = maskLayer;