title: How to round UIBezierPath line edge?
body: <p>I have a line drawer by UIBezierPath</p>
  
  <pre><code>let line = CAShapeLayer()
  line.path = UIBezierPath(arcCenter: center,
                            radius: radius,
                            startAngle: CGFloat(114.0/180.0) * .pi,
                            endAngle: .pi,
                            clockwise: true).cgPath
  line.lineWidth = LINE_WIDTH
  line.strokeColor = UIColor.red.withAlphaComponent(0.9).cgColor
  line.fillColor = UIColor.clear.cgColor
  </code></pre>
  
  <p>I try to round corner by adding some new CAShapeLayer()</p>
  
  <pre><code>let corner = CAShapeLayer()
  corner.path = UIBezierPath(arcCenter: coordByCorner(114.0*1.00035),
                             radius: LINE_WIDTH/2,
                             startAngle: CGFloat(114.0/180.0) * .pi,
                             endAngle: CGFloat(114.0/180.0 + 1) * .pi,
                             clockwise: false).cgPath
  corner.strokeColor = UIColor.clear.cgColor
  corner.fillColor = UIColor.red.withAlphaComponent(0.9).cgColor
  
  line.addSublayer(corner)
  </code></pre>
  
  <p>But I think this is so bad variant, and when I change colors for layers, colors changes with different timeInterval.</p>
  
  <p>Also, this all look like this:</p>
  
  <p><a href="https://i.stack.imgur.com/w8eqO.png" rel="noreferrer"><img src="https://i.stack.imgur.com/w8eqO.png" alt="enter image description here"></a></p>
  
  <p>P.S.: 1.00035 there is for remove the gap between layers. And alpha need to be &lt; 1.0 (0.1 - 0.9), so how do its opaque?</p>