Protocol

ARSKViewDelegate

Methods you can implement to mediate the automatic synchronization of SpriteKit content with an AR session.

Declaration

@protocol ARSKViewDelegate

Overview

Implement this protocol to provide SpriteKit content corresponding to ARAnchor objects tracked by the view's AR session, or to manage the view's automatic updating of such content.

This protocol extends the ARSessionObserver protocol, so your session delegate can also implement those methods to respond to changes in session status.

Topics

Handling Content Updates

- view:nodeForAnchor:

Asks the delegate to provide a SpriteKit node corresponding to a newly added anchor.

- view:didAddNode:forAnchor:

Tells the delegate that a SpriteKit node corresponding to a new AR anchor has been added to the scene.

- view:willUpdateNode:forAnchor:

Tells the delegate that a SpriteKit node's properties will be updated to match the current state of its corresponding anchor.

- view:didUpdateNode:forAnchor:

Tells the delegate that a SpriteKit node's properties have been updated to match the current state of its corresponding anchor.

- view:didRemoveNode:forAnchor:

Tells the delegate that the SpriteKit node corresponding to an AR anchor has been removed from the scene.

Relationships

See Also

Responding to AR Updates

delegate

An object you provide to mediate synchronization of the view's AR scene information with SpriteKit content.