UIView.AddGestureRecognizer(UIGestureRecognizer) UIView.AddGestureRecognizer(UIGestureRecognizer) Method


Adds a gesture recognizer to this view.

public virtual void AddGestureRecognizer (UIKit.UIGestureRecognizer gestureRecognizer);
abstract member AddGestureRecognizer : UIKit.UIGestureRecognizer -> unit
override this.AddGestureRecognizer : UIKit.UIGestureRecognizer -> unit


UIGestureRecognizer UIGestureRecognizer

The configured gesture recognizer to add to this view.


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