I am using Timer to get alarm after a while and I took example from apple source code:
It is working, but I a got warning:
displayLinkWithTarget:selector method not found.
Also if I set lock screen, the timer won't work. What I should use instead of it?
Code:
CADisplayLink *aDisplayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(drawFrame)];
[aDisplayLink setFrameInterval:animationFrameInterval];
[aDisplayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
self.displayLink = aDisplayLink;
It is working, but I a got warning:
displayLinkWithTarget:selector method not found.
Also if I set lock screen, the timer won't work. What I should use instead of it?
Last edited by a moderator: