Edit

Share via


UIView.AddGestureRecognizer(UIGestureRecognizer) Method

Definition

Adds a gesture recognizer to this view.

[Foundation.Export("addGestureRecognizer:")]
public virtual void AddGestureRecognizer (UIKit.UIGestureRecognizer gestureRecognizer);
abstract member AddGestureRecognizer : UIKit.UIGestureRecognizer -> unit
override this.AddGestureRecognizer : UIKit.UIGestureRecognizer -> unit

Parameters

gestureRecognizer
UIGestureRecognizer

The configured gesture recognizer to add to this view.

Attributes

Remarks

Adding a gesture recognizer to a view allows definition of the scope of that represented gesture, and causes it to receive touches that are hit-tested to that view and to all of its subviews. That view then establishes a strong reference to the gesture recognizer.

Applies to