I have a NSTimer object that I need to invalidate if a user taps on a button or if they exit a view.
NSTimer
So I have:
[myNSTimer invalidate];
What I usually do is nil-out the member variable holding the timer, either when it fires, or when I invalidate it. Then you can just do:
[myNSTimer invalidate]; myNSTimer = nil;
and it'll do the right thing.