Stop Using Swift Timers: Use CADisplayLink

Photo by Veri Ivanova on Unsplash

Before we start

Some basic animations, like my loading animation run fine using times to repeat the code blocks and make a UI that looks rather nice to the user.

But this has nothing to do with the framerate of the user’s device, and this may produce a rather horrible drift of the…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store