How to find if NSTimer is active or not?

Viewed 24021

I have a timer something like this:

 NSTimer* timer = [NSTimer scheduledTimerWithTimeInterval:1.0
                                                   target:self
                                                 selector:@selector(updateCountdown)
                                                 userInfo:nil
                                                  repeats:YES]; 

I am updating a label's text using this timer. At a certain condition, I want to check if the timer is active then invalidate the timer. My question is how do I find that timer is active or not?

4 Answers
Related