Apply rounded corners to arc created with UIBezierPath Apply rounded corners to arc created with UIBezierPath objective-c objective-c

Apply rounded corners to arc created with UIBezierPath


Set lineCapStyle to kCGLineCapRound (On the bezier path) to draw the ends of the lines with a round edge.

You can also set the lineCap on the shape layer to do the same thing.


To make corner as round you can use this.

arc.lineCap = @"round";


The swift equivalent is:

let circlePath = UIBezierPath(…)circlePath.lineCapStyle = .round