OC, oc Language
Overview
Core Animation
CAAnimation class
Proxy method of CAAnimation
CAMediaTiming Protocol
Animation filling mode
Note:
- To make the fill mode valid, set the removedOnCompletion attribute of the animation to NO.
Four modes
- KCAFillModeForwards: After the animation ends, the layer remains in the animation end state.
- KCAFillModeBackwards: add the animation to the layer and immediately enter the initial state of the animation. Wait until the animation starts to run.
- KCAFillModeBoth
- KCAFillModeRemoved. After the animation ends, the layer will return to its original state.
Animation Speed Control Function
- KCAMediaTimingFunctionLinear, constant speed
- KCAMediaTimingFunctionEaseIn
- KCAMediaTimingFunctionEaseOut, entering at full speed, slowing down to the target location
- KCAMediaTimingFunctionEaseInEaseOut
- KCAMediaTimingFunctionDefault, default speed, that is, kCAMediaTimingFunctionEaseInEaseOut