<!--
{
  "availability" : [
    "macOS: 10.7.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTouch/Phase-swift.struct",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@E@NSTouchPhase"
  },
  "title" : "NSTouch.Phase"
}
-->

# NSTouch.Phase

The possible phases of a touch.

```
struct Phase
```

## Overview

These constants are used by [`phase`](/documentation/AppKit/NSTouch/phase-swift.property).

## Topics

### Creating a Touch Phase

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

Creates a new touch phase from the given raw value.

### Constants

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

A finger touched the device. Or, a resting touch transitioned to an active touch and resting touches are not wanted by the view hierarchy.

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

A finger moved on the device.

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

A finger is touching the device, but hasn’t moved since the previous event.

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

A finger was lifted from the screen. Or, an active touch transitioned to a resting touch and resting touches are not wanted by the view hierarchy.

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

The system cancelled tracking for the touch, as when (for example) the window associated with the touch resigns key or is deactivated.

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

Matches the [`began`](/documentation/AppKit/NSTouch/Phase-swift.struct/began), [`moved`](/documentation/AppKit/NSTouch/Phase-swift.struct/moved), or [`stationary`](/documentation/AppKit/NSTouch/Phase-swift.struct/stationary) phases of a touch.

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

Matches any phase of a touch.

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

---

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)