- iOS 10.0+
- macOS 10.12+
- Mac Catalyst 13.0+
- tvOS 10.0+
- Core Animation
The layer that is the target of the action.
The identifier of the action.
An object implementing the
CAAction protocol or
nil if the delegate does not specify a behavior for the specified
A layer's delegate that implements this method returns an action for a specified key and stops any further searches (i.e. actions for the same key in the layer's
actions dictionary or specified by
default are not returned).
Listing 1 shows how you can create a class named
Layer that implements
CALayer and sets it as a layer's (named
Layer returns a basic animation that moves an object from left to right. The
move method searches
sublayer for an action with the key
move and, if the action is found, runs it.