Adds a target and an action to a gesture-recognizer object.
- iOS 3.2+
- Mac Catalyst 13.0+
- tvOS 9.0+
An object that is a recipient of action messages sent by the receiver when the represented gesture occurs.
nilis not a valid value.
A selector identifying a method of a target to be invoked by the action message.
NULLis not a valid value.
You may call this method multiple times to specify multiple target-action pairs. However, if you request to add a target-action pair that has already been added, then the request is ignored.