Type Property


Ease-out pacing, which causes an animation to begin quickly and then slow as it progresses.


static let easeOut: CAMediaTimingFunctionName


This is a Bézier timing function with the control points (0.0,0.0) and (0.58,1.0).

Listing 1 shows how to create a basic animation object using ease-out interpolation.

Listing 1

Creating a basic animation with an ease-out timing function

 let verticalAnimation = CABasicAnimation(keyPath: "position.y")
 verticalAnimation.fromValue = 310
 verticalAnimation.toValue = 10
 verticalAnimation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseOut)

A layer animated with the animation created by the code above and with linearly interpolated horizontal movement would describe a path similar to Figure 1.

Figure 1

Path taken using ease-out timing function

Path taken using ease-out timing function