Share via


UIGestureRecognizer.AddTarget Method

Definition

Overloads

Name Description
AddTarget(Action)

Registers a new callback for when the gesture has been recognized.

AddTarget(Action<NSObject>)

Registers a new callback for when the gesture has been recognized.

AddTarget(NSObject, Selector)

AddTarget(Action)

Registers a new callback for when the gesture has been recognized.

public UIKit.UIGestureRecognizer.Token AddTarget(Action action);
member this.AddTarget : Action -> UIKit.UIGestureRecognizer.Token

Parameters

action
Action

The method to invoke when the gesture has been recognized.

Returns

The returned token can be used later to remove this particular action from being invoked by the gesture recognizer.

Applies to

AddTarget(Action<NSObject>)

Registers a new callback for when the gesture has been recognized.

public UIKit.UIGestureRecognizer.Token AddTarget(Action<Foundation.NSObject> action);
member this.AddTarget : Action<Foundation.NSObject> -> UIKit.UIGestureRecognizer.Token

Parameters

action
Action<NSObject>

The method to invoke when the gesture has been recognized.

Returns

The returned token can be used later to remove this particular action from being invoked by the gesture recognizer using the RemoveTarget(NSObject, Selector) method.

Applies to

AddTarget(NSObject, Selector)

[Foundation.Export("addTarget:action:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public virtual void AddTarget(Foundation.NSObject target, ObjCRuntime.Selector action);
[<Foundation.Export("addTarget:action:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
abstract member AddTarget : Foundation.NSObject * ObjCRuntime.Selector -> unit
override this.AddTarget : Foundation.NSObject * ObjCRuntime.Selector -> unit

Parameters

target
NSObject
action
Selector
Attributes

Applies to