title: Remove extra space on UIBezierPath
body: <p>I have added <code>UIBezerPath</code> to <code>UIView</code> with my below code.</p>
  
  <pre><code>extension CGFloat {
      func toRadians() -&gt; CGFloat {//0 360
          return self * CGFloat(Double.pi) / 180.0
      }
  }
  
  override func viewDidAppear(_ animated: Bool) {
      let trackLayer = CAShapeLayer()
      let circularPath = UIBezierPath(arcCenter: CGPoint(x: arcView.frame.size.width/2,
                                                 y: arcView.frame.size.height),
                              radius: arcView.frame.size.height/2,
                              startAngle: CGFloat(180.0).toRadians(),
                              endAngle: CGFloat(0.0).toRadians(),
                              clockwise: true)
  
      trackLayer.path = circularPath.cgPath
      trackLayer.strokeColor = UIColor.red.cgColor
      trackLayer.lineWidth = 3
      trackLayer.fillColor = UIColor.clear.cgColor
      trackLayer.lineCap = kCALineCapButt
  
      arcView.layer.sublayers?.removeAll()
      arcView.layer.addSublayer(trackLayer)
  
  }
  </code></pre>
  
  <p>But the problem is its giving extra unwanted space on the top, which i don't need. i tried setting various value to <code>circularPath</code> but it's not setting as desired.</p>
  
  <p><a href="https://i.stack.imgur.com/OLOQH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OLOQH.png" alt="enter image description here"></a></p>