Contents

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 nil to match a request for nil that 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