Cadisplaylink is a timer that allows us to portray content on the screen at the same frequency as the screen refresh frequency, creating a new Cadisplaylink object in the application, adding him to a runloop, And give him a target and selector called when the screen refreshes
Once the DisplayLink is registered to Runloop in a specific mode, Runloop invokes selector on the Cadisplaylink bound target whenever the screen needs to be refreshed. This is target can read the timestamp of Cadisplaylink each call, to prepare the next frame to display the required data (in the process of animating the UI, it is necessary to calculate the size of the UI object to be updated in the next frame of the animation by using a timestamp)
When adding to Runloop, we should use the higher priority to ensure the smooth effect of the animation.
Use of IOS Cadisplaylink timers