cancelPreviousPerformRequests(withTarget:selector:object:)
Cancels perform requests previously registered with Perform(_:with:afterdelay:).
Declaration
class func cancelPreviousPerformRequests(withTarget aTarget: Any, selector aSelector: Selector, object anArgument: Any?)Parameters
- aTarget:
The target for requests previously registered with the Perform(_:with:afterdelay:) instance method
- aSelector:
The TP40008195 CH48 for requests previously registered with the Perform(_:with:afterdelay:) instance method.
- anArgument:
The argument for requests previously registered with the Perform(_:with:afterdelay:) instance method. Argument equality is determined using Isequal(_:), so the value need not be the same object that was passed originally. Pass
nilto match a request fornilthat was originally passed as the argument.
Discussion
All perform requests are canceled that have the same target as aTarget, argument as anArgument, and selector as aSelector. This method removes perform requests only in the current run loop, not all run loops.
See Also
Sending Messages
perform(_:with:afterDelay:)perform(_:with:afterDelay:inModes:)performSelector(onMainThread:with:waitUntilDone:)performSelector(onMainThread:with:waitUntilDone:modes:)perform(_:on:with:waitUntilDone:)perform(_:on:with:waitUntilDone:modes:)performSelector(inBackground:with:)cancelPreviousPerformRequests(withTarget:)