Safari Reference Library Apple Developer
Search

Touch Class Reference

Availability
Available in iPhone OS 2.0 and later.
Companion guide

Overview

The Touch class represents a single touch on the surface. A touch is the presence or movement of a finger that is part of a unique multi-touch sequence. Use the changedTouches method to get all the touch objects that changed in a TouchEvent object.

Tasks

Accessing Properties

Properties

clientX

The x-coordinate of the touch’s location relative to the window’s viewport.

readonly attribute long clientX;
Availability

clientY

The y-coordinate of the touch’s location relative to the window’s viewport.

readonly attribute long clientY;
Availability

identifier

The unique identifier for this touch object.

readonly attribute unsigned long identifier;
Availability

pageX

The x-coordinate of the touch’s location in page coordinates.

readonly attribute long pageX;
Availability

pageY

The y-coordinate of the touch’s location in page coordinates.

readonly attribute long pageY;
Availability

screenX

The x-coordinate of the touch’s location in screen coordinates.

readonly attribute long screenX;
Availability

screenY

The y-coordinate of the touch’s location in screen coordinates.

readonly attribute long screenY;
Availability

target

The target of this touch.

readonly attribute EventTarget target;
Availability



Last updated: 2010-02-24

Did this document help you? Yes It's good, but... Not helpful...