Type Method

runBlock:queue:

Creates an action that executes a block on a specific dispatch queue.

Declaration

+ (SCNAction *)runBlock:(void (^)(SCNNode *node))block queue:(dispatch_queue_t)queue;

Parameters

block

The block to run. The block takes a single parameter:

node

The node on which the action is running.

queue

The queue to perform the action on.

Return Value

A new action object.

Discussion

When the action executes, SceneKit calls the block. This action takes place instantaneously.

This action is not reversible; the reverse action executes the same block.

See Also

Creating Custom Actions

+ runBlock:

Creates an action that executes a block.

+ customActionWithDuration:actionBlock:

Creates an action that executes a block periodically over a specified duration.

+ javaScriptActionWithScript:duration:

Creates an action that executes a JavaScript script periodically over a specified duration.