Instance Method

runAction:completionHandler:

Adds an action to the list of actions executed by the node. SceneKit calls the specified block when the action completes.

Required.

Declaration

- (void)runAction:(SCNAction *)action completionHandler:(void (^)(void))block;

Parameters

action

The action to be performed.

block

A completion block that SceneKit calls when the action completes.

Discussion

The new action is processed the next time SceneKit prepares to render a frame.

SceneKit calls your block after the action’s duration is complete. For example, in a game you could use this method to show a Game Over message after performing a fade-out action on a node that displays a player character.

See Also

Running Actions

- runAction:

Adds an action to the list of actions executed by the node.

Required.

- runAction:forKey:

Adds an identifiable action to the list of actions executed by the node.

Required.

- runAction:forKey:completionHandler:

Adds an identifiable action to the list of actions executed by the node. SceneKit calls the specified block when the action completes.

Required.