首页 > 代码库 > iOS.Animation.CAMediaTiming

iOS.Animation.CAMediaTiming

CAMediaTiming Protocol

CALayre 和 CAAnimation 实现了CAMediaTiming 接口。 

CAMediaTiming 定义了8个属性。

speed属性:

Controlling the speed of an animation or a layer can also be used to pause the animation

by setting the speed to 0. 

将speed设置为0可以来暂停动画。

下面这个Demo演示speed的使用:

https://github.com/d-ronnqvist/blogpost-codesample-PullToRefresh

Reference:

1. Controlling Animation Timing

http://ronnqvi.st/controlling-animation-timing/