Pretty basic problem.
[self performSelector:@selector(startSequence:) withObject:nil afterDelay:1.0];
However, is there a way to stop this after its been called? Thanks for any help Disco
You want +[NSObject cancelPreviousPerformRequestsWithTarget:]
. If there are multiple perform requests waiting, this will cancel all of them.
If you want some finer-grained control, you can use +[NSObject cancelPreviousPerformRequestsWithTarget:selector:object:]
. Everything matching the predicate is cancelled; if you have multiple identical requests waiting, there's no mechanism to cancel a single one.
There sure is;
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(startSequence:) object:nil];
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