An object that describes a single user interaction with your app.


@interface UIEvent : NSObject


Apps can receive many different types of events, including touch events, motion events, remote-control events, and press events. Touch events are the most common and are delivered to the view in which the touch originally occurred. Motion events are UIKit triggered and are separate from the motion events reported by the Core Motion framework. Remote-control events allow a responder object to receive commands from an external accessory or headset so that it can manage manage audio and video—for example, playing a video or skipping to the next audio track. Press events represent interactions with a game controller, AppleTV remote, or other device that has physical buttons. You can determine the type of an event using the type and subtype properties.

A touch event object contains the touches (that is, the fingers on the screen) that have some relation to the event. A touch event object may contain one or more touches, and each touch is represented by a UITouch object. When a touch event occurs, the system routes it to the appropriate responder and calls the appropriate method, such as touchesBegan:withEvent:. The responder then uses the touches to determine an appropriate course of action.

During a multitouch sequence, UIKit reuses the same UIEvent object when delivering updated touch data to your app. You should never retain an event object or any object returned from an event object. If you need to retain data outside of the responder method you use to process that data, copy that data from the UITouch or UIEvent object to your local data structures.

For more information on how to handle events in your UIKit app, see Event Handling Guide for UIKit Apps.


Getting the Touches for an Event


Returns all touches associated with the event.

- touchesForView:

Returns the touch objects from the event that belong to the specified given view.

- touchesForWindow:

Returns the touch objects from the event that belong to the specified window.

- coalescedTouchesForTouch:

Returns all of the touches associated with the specified main touch.

- predictedTouchesForTouch:

Returns an array of touches that are predicted to occur for the specified touch.

Getting Event Attributes


The time when the event occurred.

Getting the Event Type


Returns the type of the event.


Returns the subtype of the event.

Getting the Touches for a Gesture Recognizer

- touchesForGestureRecognizer:

Returns the touch objects that are being delivered to the specified gesture recognizer.



Specifies the general type of an event


Specifies the subtype of the event in relation to its general type.

Instance Properties


Inherits From

See Also

First Steps

Using Responders and the Responder Chain to Handle Events

Learn how to handle events that propagate through your app.


An abstract interface for responding to and handling events.