Use of IOS Cadisplaylink timers

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.