Contents

present(_:with:incomingPointOfView:completionHandler:)

Displays the specified scene with an animated transition.

Declaration

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

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