使用 CAShapeLayer + UIBezierPath 方式
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:VIEW.bounds byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(15, 0)];
CAShapeLayer * maskLayer = [[CAShapeLayer alloc]init];
maskLayer.frame = VIEW.bounds;
maskLayer.path = maskPath.CGPath;
VIEW.layer.mask = maskLayer;
typedef NS_OPTIONS(NSUInteger, UIRectCorner) {
UIRectCornerTopLeft = 1 << 0, 【左上】
UIRectCornerTopRight = 1 << 1, 【右上】
UIRectCornerBottomLeft = 1 << 2, 【左下】
UIRectCornerBottomRight = 1 << 3, 【右下】
UIRectCornerAllCorners = ~0UL 【全部4圆角】
};