I have blue UIView and I want top corners.
This is my code:
UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:self.backgroundContentView.bounds byRoundingCorners:(UIRectCornerTopLeft | UIRectCornerTopRight) cornerRadii:CGSizeMake(20.0, 20.0)];
CAShapeLayer *shapeLayer = [[CAShapeLayer alloc] init];
shapeLayer.frame = self.backgroundContentView.bounds;
shapeLayer.path = path.CGPath;
self.backgroundContentView.layer.mask = shapeLayer;
But I have only leftTop corner. Why?