Have a question... I have Timer
[NSTimer scheduledTimerWithTimeInterval:120
target:self
selector:@selector(action1:)
userInfo:nil
repeats:YES];
But when I move to another screen of my app I want to change selector...How can I change selector ? I know that I can stop my timer and set a new one, but I don't wont to reset a time remained to fire action...Thanks....
You can't. NSTimer takes its targeting information in its instantiation methods, and doesn't expose any properties to modify that later.
You're going to have to invalidate this timer and create a new one on the new target.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With