iOS view 切任意角圆角
作者:
静守幸福 | 来源:发表于
2020-07-02 10:15 被阅读0次// UIRectCornerTopLeft | UIRectCornerTopRight 控制切角位置 cornerRadii 圆角大小 view 需要切圆角的view
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:view.bounds byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(19*kWidthScale, 19*kWidthScale)];
CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
maskLayer.frame = view.bounds;
maskLayer.path = maskPath.CGPath;
view.layer.mask = maskLayer;
本文标题:iOS view 切任意角圆角
本文链接:https://www.haomeiwen.com/subject/lyylqktx.html
网友评论