IOS 切任意角度
2019-09-25 本文已影响0人
不要动
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:btn.bounds byRoundingCorners:UIRectCornerBottomRight cornerRadii:CGSizeMake(10, 10)];
CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
maskLayer.frame = btn.bounds;
maskLayer.path = maskPath.CGPath;
btn.layer.mask = maskLayer;
IOS 切任意角度