<!--
{
  "availability" : [
    "macOS: 10.6.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTouch",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTouch"
  },
  "title" : "NSTouch"
}
-->

# NSTouch

A snapshot of a particular touch at an instant in time.

```
class NSTouch
```

## Overview

A touch event is not persistent throughout the touch. A touch creates new instances as it progresses. Use the identity property to follow a specific touch across its lifetime.

Touches do not have a corresponding screen location. The first touch of a touch collection latches to the view underlying the cursor using the same hit detection as mouse events. Additional touches on the same device latch to the same view. Latches remain on views until the user ends a touch or an event cancels it.

## Topics

### Getting the Touch Type

[`type`](/documentation/AppKit/NSTouch/type)

A type of touch from a Touch Bar interaction.

[`TouchType`](/documentation/AppKit/NSTouch/TouchType)

A bit mask identifying a direct or indirect touch type.

[`TouchTypeMask`](/documentation/AppKit/NSTouch/TouchTypeMask)

A bit mask identifying a direct or indirect touch type.

### Using Touch Properties

[`identity`](/documentation/AppKit/NSTouch/identity)

The changes to a particular touch during its lifetime.

[`phase`](/documentation/AppKit/NSTouch/phase-swift.property)

The current phase of the touch.

[`Phase`](/documentation/AppKit/NSTouch/Phase-swift.struct)

The possible phases of a touch.

[`normalizedPosition`](/documentation/AppKit/NSTouch/normalizedPosition)

The normalized position of the touch.

[`resting`](/documentation/AppKit/NSTouch/isResting)

The indicator for a resting touch.

### Using Touch Device Properties

[`device`](/documentation/AppKit/NSTouch/device)

The digitizer that generates the touch. Useful to distinguish touches emanating from multiple-device scenarios.

[`deviceSize`](/documentation/AppKit/NSTouch/deviceSize)

The range of the touch device in points, such as 72 ppi.

### Getting the Touch Location

[`-  locationInView:`](/documentation/AppKit/NSTouch/location(in:))

Indicates the location of the touch in the view’s coordinates.

[`-  previousLocationInView:`](/documentation/AppKit/NSTouch/previousLocation(in:))

Indicates the previous location of the touch in the view’s coordinates.

## Relationships

### Conforms To

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Sendable`](/documentation/Swift/Sendable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Equatable`](/documentation/Swift/Equatable)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)