I was using NSTimer for my iOS application but I wasn't getting the result I wanted because of SetNeedsDisplay.
I made some research and found the CADisplayLink which is giving me the result I want about the animation. Sadly I can't manage to put a timer like I do with NSTimer.
[NSTimer scheduledTimerWithTimeInterval:0.250 target:self selector:@selector(setGaugeLevel) userInfo:nil repeats:YES];
My CADisplayLink is calling my function too fast, I'd like to give it the same timer I had when I was using my NSTimer (0.250 sec).
CADisplayLink *displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(setGaugeLevel)];
[displayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSDefaultRunLoopMode];
The setGaugeLevel function just have a loop inside with a SetValue function which contains, in every iteration:
[self setNeedsDisplay];
Is there any way to slow it down to get the result I want ?