<!--
{
  "availability" : [
    "macOS: 10.6.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSResponder/touchesEnded(with:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSResponder(im)touchesEndedWithEvent:"
  },
  "title" : "touchesEnded(with:)"
}
-->

# touchesEnded(with:)

Returns that a set of touches have been removed.

```
func touchesEnded(with event: NSEvent)
```

## Parameters

`event`

An event object representing the ending of a touch event.

## Discussion

The system sends the event to the view under the touch in the key window. To get the set of touches that ended for this view (or descendants of this view) call [`touches(matching:in:)`](/documentation/AppKit/NSEvent/touches(matching:in:)) on `event` and pass [`ended`](/documentation/AppKit/NSTouch/Phase-swift.struct/ended) for the phase.

This isn’t always the point of removal with the touch device. A touch that transitions from active to resting may be part of an [`touchesEnded(with:)`](/documentation/AppKit/NSResponder/touchesEnded(with:)) set.

---

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)