Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to find the refresh rate for iPhone?

I want to know if it is possible to find the refresh rate for the iPhone screen, programmatically. I have searched, but have found no private API available.

Is there any way to find this out?

Thanks in advance.

like image 861
V.V Avatar asked May 03 '11 04:05

V.V


People also ask

Is iPhone 13 60Hz or 120Hz?

They allow for smoother scrolling, more responsive games, and are now a staple on flagship Android devices. Unfortunately, the iPhone 13 and iPhone 13 mini do not have a 120Hz refresh rate of any kind. Instead, they're stuck with the traditional 60Hz speed that we've had for years.


2 Answers

I believe the iPhone screen refresh rate is fixed to 60Hz, but you can test this yourself using the CADisplayLink API which will call a selector you choose whenever the screen is updated

Use something like:

CADisplayLink *displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(update)];
[displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
like image 188
Wossname Avatar answered Oct 29 '22 09:10

Wossname


Yes, it's possible. On iOS 10.3+ you can use UIScreen.maximumFramesPerSecond to get "The maximum number of frames per second of which the screen is capable."

like image 44
janoside Avatar answered Oct 29 '22 09:10

janoside