Does SwiftUI have/need an equivalent to Flutter's ticker with vsync?

53 views Asked by At

Lets say we're using SwiftUI and we are using a timer to fire X times per second.

Every time the timer callback fires, we update a @State variable that triggers a view update with the new value.

Lets say we have X set to 60 so we are presuming that these updates happen 60 times per second.

Question: Do we need to use something equivalent to Flutter's "ticker with vsync" mechanism to ensure that the updates are synced the the screen refresh rate? Or does SwiftUI take care of that automatically? Or does it not matter since ios devices are running at 120hz anyway, so any "aliasing" of the updates will not be apparent?

0

There are 0 answers