官方文档:Optimizing ProMotion Refresh Rates for iPhone 13 Pro and iPad Pro
很简单:
直接在plist文件里添加
<key>CADisableMinimumFrameDurationOnPhone</key><true/>
官网介绍:
Enable Faster ProMotion Refresh Rates
If you don’t enable faster refresh rates for your app, your CADisplay<wbr data-v-78dd96cf="">Link
callback might run at any of the speeds that the ProMotion display supports, at different times during normal GUI operations. In these cases, other animations in the system may affect the rate at which Core Animation calls your CADisplay<wbr data-v-78dd96cf="">Link
callback. The rate at which Core Animation calls your CADisplay<wbr data-v-78dd96cf="">Link
callback may not match the refresh rate hints that you provide to your CADisplay<wbr data-v-78dd96cf="">Link
callback. Specifically, Core Animation won’t unlock any refresh rate that’s faster than the system’s default.
On iPhone 13 Pro or iPhone 13 Pro Max, add the following key to your Info<wbr data-v-78dd96cf="">.plist
file to enable the full range of refresh rates for CADisplay<wbr data-v-78dd96cf="">Link
callbacks and CAAnimation
animations in your app:
<key>CADisableMinimumFrameDurationOnPhone</key><true/>
Your app must use this key to access higher frame rates (above 60Hz) it sets in the preferred<wbr data-v-78dd96cf="">Frame<wbr data-v-78dd96cf="">Rate<wbr data-v-78dd96cf="">Range
hint API. The iPad Pro doesn’t require this special configuration.
网友评论