Instance Method


Removes a target and an action from a gesture-recognizer object.


func removeTarget(_ target: Any?, action: Selector?)



An object that currently is a recipient of action messages sent by the receiver when the represented gesture occurs. Specify nil if you want to remove all targets from the receiver.


A selector identifying a method of a target to be invoked by the action message. Specify NULL if you want to remove all actions from the receiver.


Calling this method removes the specified target-action pair. Passing nil for target matches all targets and passing NULL for action matches all actions.

See Also

Adding and Removing Targets and Actions

func addTarget(Any, action: Selector)

Adds a target and an action to a gesture-recognizer object.