Killing a NSTimer
Killing a NSTimer
- Subject: Killing a NSTimer
- From: Jerry Brace <email@hidden>
- Date: Sat, 11 Jun 2005 15:28:23 -0230
I'm using an NSTimer for an event which fires once after it is set (Repeats:NO).
I'd like to know how to cancel/remove this timer in another event.
Ex: I click "Snooze" to start the timer and then I click the "Close" before the snooze timer fires. I want the close button to kill the snooze timer.
NSTimer * snoozeTimer = [NSTimer timerWithTimeInterval:snoozeSeconds target:self selector:@selector(snoozeControl) userInfo:nil repeats:NO]; [[NSRunLoop currentRunLoop] addTimer:snoozeTimer forMode:NSDefaultRunLoopMode];
Thanks! Jerry |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden