How to make corner for Arc : <p>I have made an arc like below. By specifying the Radius, Start angle, End angle </p>

<pre><code>    CGContextAddArc(ctx, self.frame.size.width/2  , self.frame.size.height/2,
 self.radius, 2*M_PI, 3*M_PI/2-ToRad(angle), 0);
</code></pre>

<p>Now <strong>i want to make the corner of arch rounded</strong>. So need of drawing circles on the both ends. Because I'm using frame dimensions giving constants wont work.</p>

<p><a href="https://i.stack.imgur.com/Rt3yC.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Rt3yC.png" alt="enter image description here"></a></p>
