let slayer = CAShapeLayer()
let center = CGPoint(x: (bounds.width / 2) + 4, y: bounds.height - 8)
let radius: CGFloat = bounds.height - 16
let startAngle: CGFloat = 4 * .pi / 4
let endAngle: CGFloat = 0.0
slayer.path = UIBezierPath(arcCenter: center,
radius: radius,
startAngle: startAngle,
endAngle: endAngle,
clockwise: true).cgPath
slayer.lineWidth = 15.0
slayer.lineCap = kCALineCapRound
slayer.strokeColor = UIColor.blue.cgColor
slayer.fillColor = UIColor.clear.cgColor
self.layer.addSublayer(slayer)
Please look at the following image. The requirement is this circle with animation it till a particular angle.