Search code examples
sprite-kitframe-rate

Frame rate 120fps, new iPad Pro: Enable how?


Is it possible to enable and play/run at 120Hz on the new iPad Pros with Sprite Kit?

If so, how?


Solution

  • See this documentation: https://developer.apple.com/library/content/technotes/tn2460/_index.html

    You pretty much need to allow custom frame rates by setting CADisableMinimumFrameDuration = true in your Info.plist

    (This should not be needed in future updates, not sure if iOS 11 already did these changes)

    Then you change your View's frame rate with:

    let maxFPS = UIScreen.maximumFramesPerSecond
    
    preferredFramesPerSecond = maxFPS