释放双眼,带上耳机,听听看~!
UIRectCorner corner = UIRectCornerTopRight | UIRectCornerTopLeft; // 圆角位置,全部位置
UIBezierPath * path = [UIBezierPath bezierPathWithRoundedRect:self.btnImg.bounds byRoundingCorners:corner cornerRadii:CGSizeMake(5, 5)];
CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
maskLayer.frame = self.btnImg.bounds;
maskLayer.path = path.CGPath;
view.layer.mask = maskLayer;