title: how to draw an arc with line using UIBezierPath
body: <p>I am trying to draw shape shown in figure. Background is white.. Hope it is visible to you..</p>
  
  <p><img src="https://i.stack.imgur.com/cr3Bk.png" alt="enter image description here"></p>
  
  <p>I am using bezier path to draw this. I have provided bounds to shape as shown by blue border. </p>
  
  <p><img src="https://i.stack.imgur.com/Yqin3.png" alt="enter image description here"></p>
  
  <p>So far I am successfully able to draw just two lines(shown in green). I have to draw the one with red further.</p>
  
  <p><img src="https://i.stack.imgur.com/SOKBJ.jpg" alt="enter image description here"></p>
  
  <p>I am unable to draw arc from this point. I can't understand how to pass correct parameters to <code>addArcWithCenter</code>. </p>
  
  <p><strong>Code</strong></p>
  
  <pre><code>-(void) drawRect:(CGRect)rect
  {
      //declare and instantiate the UIBezierPath object
      aPath = [UIBezierPath bezierPath];
  
      // Set the starting point of the shape.
      [aPath moveToPoint:CGPointMake(CGRectGetMinX(rect), CGRectGetMinY(rect))];
  
      // Draw some lines.
      [aPath addLineToPoint:CGPointMake(CGRectGetMaxX(rect), CGRectGetMinY(rect))];
      [aPath addLineToPoint:CGPointMake(CGRectGetMaxX(rect), CGRectGetMaxY(rect) - 40)];
      [aPath addArcWithCenter:self.center radius:40 startAngle:3 *(M_PI / 2) endAngle:M_PI clockwise:NO];
  
      //set the line width
      aPath.lineWidth = 2;
  
      //set the stoke color
      [[UIColor greenColor] setStroke];
  
      //draw the path
      [aPath stroke];
  
  }
  </code></pre>
  
  <p>I am new to core graphics. Please be lenient over me.. Thanks..</p>