iOS Guides | Samples

MonoTouch.UIKit.UIGestureRecognizer Class

Base class for gesture recognizers.

See Also: UIGestureRecognizer


[MonoTouch.Foundation.Register("UIGestureRecognizer", true)]
[MonoTouch.ObjCRuntime.Introduced(MonoTouch.ObjCRuntime.PlatformName.iOS, 3, 2, MonoTouch.ObjCRuntime.PlatformArchitecture.None, null)]
public class UIGestureRecognizer : NSObject

See Also


This abstract base class provides features common to recognizers of touch-oriented user gestures.

Related content


Namespace: MonoTouch.UIKit
Assembly: monotouch (in monotouch.dll)
Assembly Versions:

The members of MonoTouch.UIKit.UIGestureRecognizer are listed below.

See Also: NSObject

Public Constructors

Default constructor that initializes a new instance of this class with no parameters.
Constructs a gesture recognizer and provides a method to invoke when the gesture is recognized.
A constructor that initializes the object from the data stored in the unarchiver object.
Constructor to call on derived classes to skip initialization and merely allocate the object.
A constructor used when creating managed representations of unmanaged objects; Called by the runtime.
Initializes a designated gesture-recognizer.
Initalizes a gesture recognizer.

Public Fields

ParametrizedSelectorSelector. A selector that points to "target:", that is, a method that takes one NSObject argument.

Public Properties

AllowedPressTypesNSNumber[]. An array of UIPressType that the gesture recognizer responds to.
AllowedTouchTypesNSNumber[]. An array of UITouchType that the gesture recognizer responds to.
CancelsTouchesInViewBoolean. Whether touches recognized as part of a gesture should be delivered to the underlying UIView.
ClassHandleIntPtr. The handle for this class.
DelaysTouchesBeganBoolean. Whether this UIGestureRecognizer should delay sending touches to the underlying UIVew during the gesture's begin phase.
DelaysTouchesEndedBoolean. Whether this UIGestureRecgonizer should delay sending touches to the underlying UIView during the gesture's end phase.
DelegateUIGestureRecognizerDelegate. An instance of the MonoTouch.UIKit.UIGestureRecognizerDelegate model class which acts as the class delegate.
EnabledBoolean. Whether the UIGestureRecognizer is enabled.
NumberOfTouchesInt32. The number of touches involved in the gesture.
ShouldBeginUIGestureProbe. Delegate invoked by the object to get a value.
ShouldBeRequiredToFailByUIGesturesProbe. Delegate invoked by the object to get a value.
ShouldReceivePressUIGesturesPress. Delegate invoked by the object to get a value.
ShouldReceiveTouchUITouchEventArgs. Delegate invoked by the object to get a value.
ShouldRecognizeSimultaneouslyUIGesturesProbe. Delegate invoked by the object to get a value.
ShouldRequireFailureOfUIGesturesProbe. Delegate invoked by the object to get a value.
StateUIGestureRecognizerState. The current state of this UIGestureRecognizer.
ViewUIView. The UIView to which this UIGestureRecognizer is attached. Read-only.
WeakDelegateNSObject. An object that can respond to the delegate protocol for this type

Public Methods

AddTarget(NSAction) : UIGestureRecognizer+Token
Registers a new callback for when the gesture has been recognized.
AddTarget(Action<MonoTouch.Foundation.NSObject>) : UIGestureRecognizer+Token
Registers a new callback for when the gesture has been recognized.
AddTarget(NSObject, Selector)
Low-level version of AddTarget.
CanBePreventedByGestureRecognizer(UIGestureRecognizer) : Boolean
When overridden, allows the specified UIGestureRecognizer to prevent this UIGestureRecognizer from recognizing a gesture.
CanPreventGestureRecognizer(UIGestureRecognizer) : Boolean
When overridden, indicates that this UIGestureRecognizer can prevent the specified UIGestureRecognizer from recognizing a gesture.
IgnorePress(UIPress, UIPressesEvent)
Developers may override this method to tell the gesture recognizer to ignore specific presses.
IgnoreTouch(UITouch, UIEvent)
Ignores a specific touch of the given event.
LocationInView(UIView) : PointF
The PointF in the given UIView of the gesture represented by this UIGestureRecognizer.
LocationOfTouch(Int32, UIView) : PointF
The location, in the local coordinate system of the UIView, of one of the gesture's touches.
PressesBegan(NSSet, UIPressesEvent)
Indicates that a physical button has been pressed on a remote or game controller.
PressesCancelled(NSSet, UIPressesEvent)
Indicates a physical button-press event has been cancelled due to a system event.
PressesChanged(NSSet, UIPressesEvent)
Indicates that the UIPress.Force value of the evt has changed.
PressesEnded(NSSet, UIPressesEvent)
Indicates the ending of a press of a physical button on a remote or game controller.
Removes the callback method for the specified gesture being recognized, based on the token that was returned by AddTarget.
RemoveTarget(NSObject, Selector)
Low-level counterpart to the low-level AddTarget method.
Causes this UIGestureRecognizer to only work if the specified UIGestureRecognizer fails (e.g., a single-tap gesture might require that a double-tap gesture fail).
When overridden, allows the application developer to reset internal state when a gesture is recognized.
ShouldBeRequiredToFailByGestureRecognizer(UIGestureRecognizer) : Boolean
Specifically overridden to indicate that a receiver requires the specified gesture recognizer to fail.
ShouldRequireFailureOfGestureRecognizer(UIGestureRecognizer) : Boolean
Returns a value that tells whether the receiver requires otherGestureRecognizer to fail.
TouchesBegan(NSSet, UIEvent)
Indicates that one or more fingers have touched down in the associated UIView.
TouchesCancelled(NSSet, UIEvent)
Indicates that a system event (e.g., a low-memory warning) has cancelled the touch event.
TouchesEnded(NSSet, UIEvent)
Indicates that one or more fingers have lifted in the associated UIView.
Called when the estimated properties of touches have been updated.
TouchesMoved(NSSet, UIEvent)
Indicates that one or more fingers have moved in the associated UIView.

Protected Methods

Releases the resources used by the UIGestureRecognizer object.