LayerAnimator provides access to all animatable properties on a CALayer. Use the animator property on any CALayer instance to animate its properties within a Wave animation block.
Usage
Access the animator through theanimator property on any CALayer:
Appearance properties
Properties that control the layer’s visual appearance.The corner radius of the attached layer.
The opacity of the attached layer.
The background color of the attached layer.
Border properties
Properties that control the layer’s border appearance.The border color of the attached layer.
The border width of the attached layer.
Shadow properties
Properties that control the layer’s shadow appearance.The shadow color of the attached layer.
The shadow opacity of the attached layer.
The shadow offset of the attached layer.
The shadow radius of the attached layer.
Complete example
UIView convenience
ManyLayerAnimator properties are also available as convenience properties on ViewAnimator for animating a UIView’s underlying layer:
ViewAnimator properties forward to LayerAnimator:
cornerRadiusborderColor(converted from UIColor to CGColor)borderWidthshadowColor(converted from UIColor to CGColor)shadowOpacityshadowOffsetshadowRadius