Type Method 型メソッド

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 Selector 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 メッセージ送信