美文网首页
iOS CAShapeLayer UIBezierPath 画圆

iOS CAShapeLayer UIBezierPath 画圆

作者: 天空中的球 | 来源:发表于2020-05-16 16:52 被阅读0次

iOS CAShapeLayer UIBezierPath 画圆时 锯齿超严重:

 _shapeLayer.shouldRasterize = YES;
 _shapeLayer.rasterizationScale = 2 * [[UIScreen mainScreen] scale];
self.view.layer.allowsEdgeAntialiasing = YES;
self.view.layer.borderColor = [UIColor clearColor].CGColor;
self.view.layer.borderWidth = 1.f;

以上三种方法都可以好好尝试下,
我用的是第一种方法修饰后,发现效果好了很多。

相关文章

网友评论

      本文标题:iOS CAShapeLayer UIBezierPath 画圆

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