Protocol

SCNActionable

Methods for running actions on nodes.

Declaration

@protocol SCNActionable

Overview

SCNAction objects represent reusable, animated actions that can be performed on nodes, such as moving or rotating them. You use an SCNAction class method to create an action and then use methods in the SCNActionable protocol to run the action on a node. This protocol also defines methods for checking whether a node has any currently running actions and, if so, canceling them.

Topics

Running Actions

- runAction:

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

Required.

- runAction:completionHandler:

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

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.

Inspecting a Node’s Running Actions

- actionForKey:

Returns an action associated with a specific key.

Required.

hasActions

A Boolean value that indicates whether the node is currently executing any actions.

Required.

actionKeys

The list of keys for which the node has attached actions.

Required.

Canceling a Node’s Running Actions

- removeActionForKey:

Removes an action associated with a specific key.

Required.

- removeAllActions

Ends and removes all actions from the node.

Required.

Relationships

Inherits From

Conforming Types

See Also

Actions

SCNAction

A simple, reusable animation that changes attributes of any node you attach it to.