       animation.fromValue = from
       animation.toValue = to
       animation.duration = duration
-      animation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseIn)
+        animation.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeIn)
       animation.repeatCount = 0
-      animation.fillMode = kCAFillModeForwards
+        animation.fillMode = CAMediaTimingFillMode.forwards
       animation.isRemovedOnCompletion = false
       return animation
     }()

    spinnerCircle.lineWidth = spinnerLineWidth
    spinnerCircle.strokeStart = 0
    spinnerCircle.strokeEnd = 0.33
    spinnerCircle.lineCap = kCALineCapRound
    spinnerCircle.fillColor = UIColor.clear.cgColor
    spinnerCircle.strokeColor = spinnerStartColor
    spinnerCircleView.layer.addSublayer(spinnerCircle)

      animation.fromValue = 0.33
      animation.toValue = 1
      animation.duration = duration
        animation.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeOut)
      animation.repeatCount = 0
        animation.fillMode = CAMediaTimingFillMode.forwards
      animation.isRemovedOnCompletion = false
      return animation
    }()
