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 ?.