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

Filed under:
|

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

Related posts about ios

Related posts about objective-c