Instance Method

animationForKey:

Returns the animation that should be performed for the specified key.

Required.

Declaration

- (id)animationForKey:(NSAnimatablePropertyKey)key;

Parameters

key

The action name or property specified as a string.

Return Value

The animation to perform. A subclass of CAAnimation.

Discussion

When the action specified by key is triggered for an object, this method is consulted to find the animation, if any, that should be performed in response.

Like its Core Animation CALayer counterpart, actionForKey:, this method is a funnel point that defines the order in which the search for an animation proceeds.It first checks the receiver's Getting the Animator Proxy dictionary for a value matching key, then falls back to animator for the receiver's class.

Subclasses should not typically need to override this method.

See Also

Managing Animations for Properties

animations

Sets the option dictionary that maps event trigger keys to animation objects.

Required.

+ defaultAnimationForKey:

Returns the default animation that should be performed for the specified key.

Required.