iOS Guides | Samples

MonoTouch.UIKit.UITouch Class

Represents a touch event on the screen.

See Also: UITouch


[MonoTouch.Foundation.Register("UITouch", true)]
public class UITouch : NSObject


This object encapsulates a touch or a finger movement on the screen.

The UITouch event is typically available from the NSSet passed to the Touch methods and also from the UIEvent instance that is passed to those methods.

UIViews by default only handle a single touch event at once. If you want your view to handle multiple touches, you must set the UIView.MultipleTouchEnabled to true.

iOS creates a T:MonoTouch.UIKit.UIEvent object any time a finger touches the screen, moves or is removed from the screen. The UIEvent encapsulates all of the touches that are taking place on the screen at this point, even those that do not belong to this view. In addition to the UIEvent, there is an NSSet containing UITouch objects that represent the state of each finger on the screen for this particular view.

Related content


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

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

See Also: NSObject

Public Constructors

Default constructor that initializes a new instance of this class with no parameters.
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.

Public Properties

AltitudeAngleSingle. The altitude, in radians, above horizontal, of the stylus.
ClassHandleIntPtr. The handle for this class.
EstimatedPropertiesUITouchProperties. The set of properties that may vary over the course of a touch.
EstimatedPropertiesExpectingUpdatesUITouchProperties. The set of properties that are likely to vary over the course of a touch.
EstimationUpdateIndexNSNumber. If not null, a monotonically-increasing index into UITouch objects that have UITouch.EstimatedProperties.
ForceSingle. Gets the force of the touch, where 1.0 represents the system-defined average force.
GestureRecognizersUIGestureRecognizer[]. The UIGestureRecognizers that are receiving this UITouch.
MajorRadiusSingle. The radius of the touch, governed by the UITouch.MajorRadiusTolerance setting.
MajorRadiusToleranceSingle. Provides the tolerance for the MajorRadius property.   The actual radius is measured by MajorRadius±MajorRadiusTolerance.
MaximumPossibleForceSingle. Gets the maximum force value that the system will recognize.
PhaseUITouchPhase. The UITouchPhase of this UITouch.
TapCountInt32. The number of taps associated with this UITouch. Read-only.
TimestampDouble. The time when this UITouch was created or last mutated. Read-only.
TypeUITouchType. The UITouchType of the UITouch.
ViewUIView. The UIView in which this UITouch occurred. Read-only.
WindowUIWindow. The UIWindow in which this UITouch occurred. Read-only.

Public Methods

GetAzimuthAngle(UIView) : Single
Returns the rotation of the stylus relative to the plane of the screen, in radians.
GetAzimuthUnitVector(UIView) : CGVector
Returns the rotation of the pointing device relative to the plane of the screen, as a unit vector.
GetPreciseLocation(UIView) : PointF
Returns a precise location for the UITouch.
GetPrecisePreviousLocation(UIView) : PointF
Returns the UITouch object's previous precise location.
LocationInView(UIView) : PointF
The location of this UITouch, in the coordinate system of the specified UIView.
PreviousLocationInView(UIView) : PointF
The previous location of this UITouch, in the coordinate system of the specified UIView.