美文网首页
view设置制定的圆角

view设置制定的圆角

作者: 放肆的洒脱 | 来源:发表于2019-03-22 16:48 被阅读0次
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:view.bounds byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(6, 6)];
    CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
    maskLayer.frame = view.bounds;
    maskLayer.path = maskPath.CGPath;
    view.layer.mask = maskLayer;

相关文章

网友评论

      本文标题:view设置制定的圆角

      本文链接:https://www.haomeiwen.com/subject/cuyrvqtx.html