//定向设置圆角UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:whiteView.bounds byRoundingCorners:UIRectCornerBottomLeft | UIRectCornerBottomRight cornerRadii:CGSizeMake(10, 10)]; CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init]; maskLayer.frame = whiteView.bounds; maskLayer.path = maskPath.CGPath; whiteView.layer.mask = maskLayer;
可以定向设置圆角
layer.cornerRadius//圆角
这个属性用在storyboard中可以设置全部圆角