Instance Method

addAnimation:forKey:

Adds an animation object for the specified key.

Required.

Declaration

- (void)addAnimation:(id<SCNAnimation>)animation forKey:(NSString *)key;

Parameters

animation

The animation object to be added.

key

An string identifying the animation for later retrieval. You may pass nil if you don’t need to reference the animation later.

Discussion

Newly added animations begin executing after the current run loop cycle ends.

SceneKit does not define any requirements for the contents of the key parameter—it need only be unique among the keys for other animations you add. If you add an animation with an existing key, this method overwrites the existing animation.

See Also

Managing Animations

- animationForKey:

Returns the animation with the specified key.

Required.

Deprecated
animationKeys

An array containing the keys of all animations currently attached to the object.

Required.

- removeAllAnimations

Removes all the animations currently attached to the object.

Required.

- removeAnimationForKey:

Removes the animation attached to the object with the specified key.

Required.

- removeAnimationForKey:fadeOutDuration:

Removes the animation attached to the object with the specified key, smoothly transitioning out of the animation’s effect.

Required.

Deprecated