Change Interval Of CADisplayLink
Posted
by
user3679109
on Stack Overflow
See other posts from Stack Overflow
or by user3679109
Published on 2014-05-27T09:22:22Z
Indexed on
2014/05/27
9:24 UTC
Read the original article
Hit count: 177
ios
|objective-c
I have replaced an NSTimer with a CADisplayLink. I have it working properly but it is running too slowly. How could I go about speeding this up? This is the code that I'm using:
ViewController.h (In {} with @interface:
CADisplayLink *displayLink;
ViewController.m (viewDidLoad):
displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(onTimer)];
[displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes];
onTimer is the method that it is calling. So my question is how do I speed up how often this is being called?
Thanks
© Stack Overflow or respective owner