(IOS)为UIView某个角添加圆角

// 左上角和右下角添加圆角
UIBezierPath*maskPath = [UIBezierPath bezierPathWithRoundedRect:view.bounds byRoundingCorners:(UIRectCornerTopLeft | UIRectCornerBottomRight) cornerRadii:CGSizeMake(20,20)];
CAShapeLayer *maskLayer = [CAShapeLayer layer];
maskLayer.frame = view.bounds;
maskLayer.path = maskPath.CGPath;
【(IOS)为UIView某个角添加圆角】view.layer.mask = maskLayer;

    推荐阅读