Instance Method

didChangeSize(_:)

Tells you when the scene’s size has changed.

Declaration

func didChangeSize(_ oldSize: CGSize)

Parameters

oldSize

The old size of the scene, in points.

Discussion

This method is intended to be overridden in a subclass. Typically, you use this method to adjust the positions of nodes in the scene.

See Also

Responding to Loading and Resizing Events

func sceneDidLoad()

Tells you when the scene is presented.

func willMove(from: SKView)

Tells you when the scene is about to be removed from a view.

func didMove(to: SKView)

Tells you when the scene is presented by a view.

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