Is there a way to increase the frequency of touchesMoved method?

I have set CADisableMinimumFrameDurationOnPhone to YES

And My device is iPhone13 Pro. The refresh rate is be 120HZ max.

But the touchesMoved callback call with a frequency of 60HZ (16.66ms) in UIViewController It should be 120HZ (0.008s) on IPhone 13 pro

Here is test code:


import SwiftUI

class HomeViewController: UIViewController,UIScrollViewDelegate {
   
  override func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?) {
    let time = CFAbsoluteTimeGetCurrent()
    print(time - oldTime) // 0.016s. But it should be 0.008s on iPhone13Pro
    oldTime = time
  }
   
  var oldTime:CFAbsoluteTime = 0
   
  override func viewDidLoad() {
    super.viewDidLoad()
    self.view.backgroundColor = .red
  }
}

So How can I increase this frequency to 120HZ ?.

Answered by Frameworks Engineer in 722021022

The frequency at which touches are delivered can change according to the refresh rate that the app is experiencing at the time. If there is 120 Hz animation occurring, your app will receive touches at 120 Hz.

Accepted Answer

The frequency at which touches are delivered can change according to the refresh rate that the app is experiencing at the time. If there is 120 Hz animation occurring, your app will receive touches at 120 Hz.

I'm trying to modify a remote game streaming client (moonlight-iOS), hoping that touch event can be called back at higher frequency than 60Hz display devices like ipad mini series.

Is there a way to increase the frequency of touchesMoved method?
 
 
Q