I am working with a CADisplayLink
in iOS to synchronize my rendering with the display screen refresh charge. On units working iOS 15 or later, CADisplayLink
permits us to specify a preferredFrameRateRange
utilizing CAFrameRateRange(minimal:most:most popular:).
I am making an attempt to grasp how to decide on the very best values for minimal, most, and most popular based mostly on totally different use instances. This is the setup I am working with:
let displayLink = CADisplayLink(goal: self, selector: #selector(render))
if #obtainable(iOS 15.0, *) {
displayLink.preferredFrameRateRange = CAFrameRateRange(minimal: 30, most: 120, most popular: 60)
} else {
displayLink.preferredFramesPerSecond = 60
}
displayLink.add(to: .present, forMode: .default)
How ought to I resolve on the values for minimal, most, and most popular?
-
For instance, what values are appropriate for apps that want easy animations or excessive efficiency?
-
Is there any steering on how these values have an effect on ProMotion shows (just like the iPhone 15 Professional Max) that dynamically modify refresh charges?
-
Are there any particular trade-offs or finest practices to contemplate for adaptive body charges or power effectivity?