Animatable Properties
在 CALayer 和 CIFilter 属性中,许多可以做动画。此附录列出这些属性,连同一起默认使用的动画。
CALayer Animatable Properties
表 B-1 列出了 CALayer 类可能会被考虑的动画属性。对于每一个属性,也列出了被创建作为隐式动画的默认动画对象。
表 B-1 Layer properties and their default animaitons
| Property | Default animation |
|---|---|
| anchorPoint | 默认使用 CABasicAnimation 对象, 表 B-2 有概述。 |
| backgroundColor | 默认使用 CABasicAnimation 对象, 表 B-2 有概述。 |
| backgroundFilters | 默认使用 CATransition 对象,在 表 B-3 中有概述。滤镜的子属性默认使用 CABasicAnimation 对象,表 B-2 中有概述。 |
| borderColor | 默认使用 CABasicAnimation 对象, 表 B-2 有概述。 |
| borderWidth | 默认使用 CABasicAnimation 对象, 表 B-2 有概述。 |
| bounds | 默认使用 CABasicAnimation 对象, 表 B-2 有概述。 |
| compositingFilter | 默认使用 CATransition 对象,在 表 B-3 中有概述。滤镜的子属性默认使用 CABasicAnimation 对象,表 B-2 中有概述。 |
| contents | 默认使用 CABasicAnimation 对象, 表 B-2 有概述。 |
| contentsRect | 默认使用 CABasicAnimation 对象, 表 B-2 有概述。 |
| cornerRadius | 默认使用 CABasicAnimation 对象, 表 B-2 有概述。 |
| doubleSlided | 没有默认的隐式动画 |
| filters | 默认使用 CABasicAnimation 对象, 表 B-2 有概述。滤镜的子属性默认使用 CABasicAnimation 对象,表 B-2 中有概述。 |
| frame | 这个属性是不能用作动画的。你可以用 bounds 和 position 属性获得相同的结果。 |
| hidden | 默认使用 CABasicAnimation 对象, 表 B-2 有概述。 |
| mask | 默认使用 CABasicAnimation 对象, 表 B-2 有概述。 |
| masksToBounds | 默认使用 CABasicAnimation 对象, 表 B-2 有概述。 |
| opacity | 默认使用 CABasicAnimation 对象, 表 B-2 有概述。 |
| position | 默认使用 CABasicAnimation 对象, 表 B-2 有概述。 |
| shadowColor | 默认使用 CABasicAnimation 对象, 表 B-2 有概述。 |
| shadowOffset | 默认使用 CABasicAnimation 对象, 表 B-2 有概述。 |
| shadowOpacity | 默认使用 CABasicAnimation 对象, 表 B-2 有概述。 |
| shadowPath | 默认使用 CABasicAnimation 对象, 表 B-2 有概述。 |
| shadowRadius | 默认使用 CABasicAnimation 对象, 表 B-2 有概述。 |
| sublayers | 默认使用 CABasicAnimation 对象, 表 B-2 有概述。 |
| sublayerTransform | 默认使用 CABasicAnimation 对象, 表 B-2 有概述。 |
| transform | 默认使用 CABasicAnimation 对象, 表 B-2 有概述。 |
| zPosition | 默认使用 CABasicAnimation 对象, 表 B-2 有概述。 |
表 B-2 列出了基于属性的动画的 attributes (属性?)。
表 B-2 Default implied Basic Animation
| Description | Value |
|---|---|
| Class | CABasicAnimation |
| Duration | 0.25 秒,或者当前事务的持续时间 |
| Key path | 设置 layer 的属性名称 |
表 B-3 Default Implied Transition
| Description | Value |
|---|---|
| Class | CABasicAnimation |
| Duration | 0.25 秒,或者当前事务的持续时间 |
| Type | Fade(kCATransition) |
| Start progress | 0.0 |
| End progress | 1.0 |
CIFilter Animatable Properties
Core Animation 添加以下动画属性到 Core Image 的 CIFilter 类。这些属性仅仅在 OS X 上可用。
- name
- enabled
关于这些信息,详见 CIFilter Core Animation Additions.