preferredFramesPerSecond
A frequency your app prefers for frame updates, affecting how often the system invokes your delegate’s callback.
Declaration
var preferredFramesPerSecond: Int { get set }Mentioned in
Discussion
The display link makes a best attempt to invoke your app’s callback at the frequency value you set to this property. However, the system also takes into account the device’s hardware capabilities and the other tasks your game or app is running.
In iOS 15 and later, the system can change the available range of frame rates because it factors in system policies and a person’s preferences. For example, Low Power Mode, critical thermal state, and accessibility settings can affect the system’s frame rate.
The system typically provides a consistent frame rate by choosing one that’s a factor of the display’s maximum refresh rate. For example, a display link could invoke your callback 60 times per second for a display with a refresh rate of 60 hertz. However, the display link could invoke your callback less frequently, such as 30, 20, or 15 times per second, by setting a smaller value.
For more information, see Optimizing iPhone and iPad apps to support ProMotion displays.