Instance Method

present(_:with:incomingPointOfView:completionHandler:)

Displays the specified scene with an animated transition.

Required.

Declaration

func present(_ scene: SCNScene, with transition: SKTransition, incomingPointOfView pointOfView: SCNNode?, completionHandler: (() -> Void)? = nil)

Parameters

scene

The new scene to be displayed.

transition

An object that specifies the duration and style of the animated transition.

pointOfView

The node to use as the pointOfView property when displaying the new scene.

completionHandler

A block that SceneKit calls after the transition animation has completed.

This block takes no parameters and has no return value.

Discussion

Use this method to change the scene displayed in a SceneKit view (or other renderer) with an animated transition. For details on transition styles, see SKTransition.

See Also

Presenting a Scene

var scene: SCNScene?

The scene to be displayed.

Required.