美文网首页
iOS绘制指定位置圆角

iOS绘制指定位置圆角

作者: Qy_iOS | 来源:发表于2020-06-23 12:48 被阅读0次

        //绘制圆角 要设置的圆角 使用“|”来组合

        UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:cell.groundView.bounds byRoundingCorners:UIRectCornerBottomLeft | UIRectCornerBottomRight cornerRadii:CGSizeMake(7, 7)];

        CAShapeLayer*maskLayer = [[CAShapeLayeralloc]init];

        //设置大小

        maskLayer.frame= cell.groundView.bounds;

        //设置图形样子

        maskLayer.path= maskPath.CGPath;

        cell.groundView.layer.mask= maskLayer;

相关文章

网友评论

      本文标题:iOS绘制指定位置圆角

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