I call a doPoof method using NSTimer as following:
[NSTimer scheduledTimerWithTimeInterval:0.2 target:self selector:@selector(doPoof:) userInfo:myCALayer repeats:FALSE];
How to replace the above using CADisplayLink instead of an NSTimer?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Why do you want to change away from NSTimer?
The point of using
CADisplayLinkis so that animations can be timed according to the video refresh interval.For a simple, non-repeating, call, NSTimer is perfectly valid.