tags:

views:

92

answers:

1

In my iPhone app, i'm using the following function to do something after some delay

- (void)performSelector:(SEL)aSelector withObject:(id)anArgument afterDelay:(NSTimeInterval)delay;

Is there any way to cancel this performSelector and stop doing some thing after the delay?

+1  A: 
[NSObject cancelPreviousPerformRequestsWithTarget:yourTarget selector:aSelector object: anArgument];
beefon