title: Add Shadow to CAShapeLayer with UIBezierPath
body: <p>need some help adding a drop shadow to a line created with a CAShapeLayer / UIBezierPath</p>
  <p>This code snippet produces the following line shape as in the screenshot below</p>
  <pre><code>        let bounds = UIScreen.main.bounds
          
          let shapeLayer = CAShapeLayer()
          shapeLayer.lineWidth = 10.0
          
          shapeLayer.frame = CGRect(x: 0, y: 0 , width: bounds.width, height: bounds.width)
          
          shapeLayer.lineWidth = 5.0
          shapeLayer.strokeColor = UIColor.red.cgColor
          
  
          let offset : CGFloat = 20
          let arcCenter = shapeLayer.position
          let radius = shapeLayer.bounds.size.width / 2.0 - offset
          let startAngle = CGFloat(0.0)
          let endAngle = CGFloat(1.0 * .pi)
          
          let circlePath = UIBezierPath(arcCenter: arcCenter, radius: radius, startAngle: startAngle, endAngle: endAngle, clockwise: true)
  
          
          shapeLayer.shadowOffset = CGSize(width: 0, height: 0)
          shapeLayer.shadowColor = UIColor.red.cgColor
          shapeLayer.shadowOpacity = 1.0
          shapeLayer.shadowRadius = 25
      
          shapeLayer.path = circlePath.cgPath
  </code></pre>
  <p><a href="https://i.stack.imgur.com/hYbtY.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hYbtY.jpg" alt="enter image description here" /></a></p>
  <p>As you can see the shadow surrounds the outer part of the semi-circle shape.</p>
  <p>Could anyone give me any hints on adding a drop shadow around <strong>the  line only</strong> ?</p>