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部分圆角
最新推荐文章于 2024-08-25 04:10:18 发布
6630

被折叠的 条评论
为什么被折叠?



