admin管理员组文章数量:1122832
I'm working with a CADisplayLink
in iOS to synchronize my rendering with the screen refresh rate. On devices running iOS 15 or later, CADisplayLink
allows us to specify a preferredFrameRateRange
using CAFrameRateRange(minimum:maximum:preferred:).
I'm trying to understand how to choose the best values for minimum, maximum, and preferred based on different use cases. Here's the setup I'm working with:
let displayLink = CADisplayLink(target: self, selector: #selector(render))
if #available(iOS 15.0, *) {
displayLink.preferredFrameRateRange = CAFrameRateRange(minimum: 30, maximum: 120, preferred: 60)
} else {
displayLink.preferredFramesPerSecond = 60
}
displayLink.add(to: .current, forMode: .default)
How should I decide on the values for minimum, maximum, and preferred?
For example, what values are suitable for apps that need smooth animations or high performance?
Is there any guidance on how these values affect ProMotion displays (like the iPhone 15 Pro Max) that dynamically adjust refresh rates?
Are there any specific trade-offs or best practices to consider for adaptive frame rates or energy efficiency?
本文标签:
版权声明:本文标题:ios - How to Choose Good Values for minimum, maximum, and preferred in CAFrameRateRange? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736306656a1933036.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论