Instance Method

runAction:withKey:

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

Declaration

- (void)runAction:(SKAction *)action withKey:(NSString *)key;

Parameters

action

The action to perform.

key

A unique key used to identify the action.

Discussion

This method is identical to runAction:, but the action is stored so that it can be retrieved later. If an action using the same key is already running, it is removed before the new action is added.

See Also

Running Actions

Getting Started with Actions

Create, configure, and run actions in SpriteKit.

- runAction:

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

- runAction:completion:

Adds an action to the list of actions executed by the node and schedules the argument block to be run upon completion of the action.

speed

A speed modifier applied to all actions executed by a node and its descendants.

paused

A Boolean value that determines whether actions on the node and its descendants are processed.

- actionForKey:

Returns an action associated with a specific key.

- hasActions

Returns a Boolean value that indicates whether the node is executing actions.

- removeAllActions

Ends and removes all actions from the node.

- removeActionForKey:

Removes an action associated with a specific key.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software