Add the specified animation object to the layer’s render tree.
- iOS 2.0+
- macOS 10.5+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
- Core Animation
The animation to be added to the render tree. This object is copied by the render tree, not referenced. Therefore, subsequent modifications to the object are not propagated into the render tree.
A string that identifies the animation. Only one animation per unique key is added to the layer. The special key
kis automatically used for transition animations. You may specify
nilfor this parameter.
duration property of the animation is zero or negative, the duration is changed to the current value of the
k transaction property (if set) or to the default value of