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

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