美文网首页
iOS 适配iPhone 13 Pro and iPad Pro

iOS 适配iPhone 13 Pro and iPad Pro

作者: xmb | 来源:发表于2021-09-26 16:32 被阅读0次

    苹果官方文档:Optimizing ProMotion Refresh Rates for iPhone 13 Pro and iPad Pro

    Enable Faster ProMotion Refresh Rates

    If you don’t enable faster refresh rates for your app, your CADisplayLink 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 CADisplayLink callback. The rate at which Core Animation calls your CADisplayLink callback may not match the refresh rate hints that you provide to your CADisplayLink 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.plist file to enable the full range of refresh rates for CADisplayLink callbacks and CAAnimationanimations in your app:

    <key>CADisableMinimumFrameDurationOnPhone</key><true/>
    

    Your app must use this key to access higher frame rates (above 60Hz) it sets in the preferredFrameRateRange hint API. The iPad Pro doesn’t require this special configuration.

    页面中文翻译如下:






    相关文章

      网友评论

          本文标题:iOS 适配iPhone 13 Pro and iPad Pro

          本文链接:https://www.haomeiwen.com/subject/rqnqnltx.html