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;
ios view部分圆角
最新推荐文章于 2022-02-18 16:50:33 发布