title: how to animation speed slow when animation stop
body: <p>My code is below. How can I speed slow when animation has stop?</p>
  
  <pre><code>extension UIView{
      func rotate() {
          let rotation : CABasicAnimation = CABasicAnimation(keyPath: "transform.rotation.z")
          rotation.fromValue = 0.0
          rotation.toValue = 25
          rotation.duration = 1.5
          rotation.isCumulative = true
          rotation.repeatCount = 1
          self.layer.add(rotation, forKey: "rotationAnimation")
      }
  }
  </code></pre>