
How to pause or play NSTimer?

NSTimer *myTimer = [NSTimer scheduledTimerWithTimeInterval:1
target:self
selector:@selector(myMethod:)
userInfo:nil
repeats:YES];
- (void) myMethod:(NSTimer *) aTimer
{
if (!pause) {
// do something
// update your GUI
}
}
//and at last
[myTimer invalidate];
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.