Reputation: 201
I'm drawing many circles using UIBezierPath and CAShapeLayer the issue is the edge of the circles are not rendered properly and it looks like a saw like in the screenshot below :
I tried to fix the problem by forcing the performance with this snippet but did not work:
shapeLayer.shouldRasterize = true
shapeLayer.rasterizationScale = UIScreen.main.scale
Upvotes: 0
Views: 163
Reputation: 201
Thanks to @PunetSharma in fact i had only to increase the scale for retina devices as explained in this link to be:
shapeLayer.rasterizationScale = 2.0 * UIScreen.main.scale
Upvotes: 1