Protocol

SKViewDelegate

Methods to take custom control over the view's render rate.

Declaration

@protocol SKViewDelegate

Overview

By setting a SpriteKit view's delegate with an object that implements SKViewDelegate, you can precisely control the frame rate of a game or app. You may choose to do this to maintain a consistent frame rate for computationally intensive code or for special effects such as simulating cine film.

The return value of view:shouldRenderAtTime: doesn't change the speed of physics simulations and actions in a SpriteKit scene. However, if you return NO, SpriteKit will skip updates and SKSceneDelegate methods are not called.

Topics

Instance Methods

- view:shouldRenderAtTime:

Specifies whether the view should render at the given time.

Relationships

Inherits From

Inherited By

See Also

Controlling the Timing of a Scene's Rendering

paused

A Boolean value that indicates whether the view’s scene animations are paused.

preferredFramesPerSecond

The animation frame rate that the view uses to render its scene.

delegate

A delegate that allows dynamic control of the view's render rate.

frameInterval

The number of frames that must pass before the scene is called to update its contents.

Deprecated