Cancels perform requests previously registered with perform
.
SDKs
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Foundation
Declaration
+ (void)cancelPreviousPerformRequestsWithTarget:(id)aTarget selector:(SEL)aSelector object:(id)anArgument;
Parameters
aTarget
The target for requests previously registered with the
perform
instance methodSelector: with Object: after Delay: aSelector
The Selector for requests previously registered with the
perform
instance method.Selector: with Object: after Delay: anArgument
The argument for requests previously registered with the
perform
instance method. Argument equality is determined usingSelector: with Object: after Delay: is
, so the value need not be the same object that was passed originally. PassEqual: nil
to match a request fornil
that was originally passed as the argument.
Discussion
All perform requests are canceled that have the same target as a
, argument as an
, and selector as a
. This method removes perform requests only in the current run loop, not all run loops.