美文网首页
部分圆角

部分圆角

作者: 赤焰军少帅林殊 | 来源:发表于2018-02-28 20:33 被阅读11次
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:self.imgView.bounds byRoundingCorners:UIRectCornerTopLeft|UIRectCornerTopRight cornerRadii:CGSizeMake(10, 10)];
    CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
    maskLayer.frame = self.imgView.bounds;
    maskLayer.path = maskPath.CGPath;
    self.imgView.layer.mask = maskLayer;

相关文章

网友评论

      本文标题:部分圆角

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