Touch class encapsulates information about a touch event.
- Safari Desktop 10.1+
- Safari Mobile 2.0+
The system continually sends
Touch objects to an application as fingers touch and move across a surface. A touch event provides a snapshot of all touches during a multi-touch sequence, most importantly the touches that are new or have changed for a particular target. A multi-touch sequence begins when a finger first touches the surface. Other fingers may subsequently touch the surface, and all fingers may move across the surface. The sequence ends when the last of these fingers is lifted from the surface. An application receives touch event objects during each phase of any touch.
The different types of
Touch objects that can occur are:
Sent when a finger for a given event touches the surface.
Sent when a given event moves on the surface.
Sent when a given event lifts from the surface.
Sent when the system cancels tracking for the touch.
Touch objects are combined together to form high-level
Gesture objects that are also sent during a multi-touch sequence. See
Gesture for details on
Gesture objects and an example of the events sent for a two finger multi-touch gesture.