<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/SpatialEventCollection/Event",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI22SpatialEventCollectionV0D0V"
  },
  "title" : "SpatialEventCollection.Event"
}
-->

# SpatialEventCollection.Event

A spatial event generated from an input like a touch or click
that can drive gestures in the system.

```
struct Event
```

## Overview

You receive a collection of these events in the form of a
[`SpatialEventCollection`](/documentation/SwiftUI/SpatialEventCollection) that’s the input to the
[`onChanged(_:)`](/documentation/SwiftUI/Gesture/onChanged(_:)) or [`onEnded(_:)`](/documentation/SwiftUI/Gesture/onEnded(_:))
method of a [`SpatialEventGesture`](/documentation/SwiftUI/SpatialEventGesture). Inspect individual events to
track interactions that enable you to create complex, multi-touch
experiences in your app.

## Topics

### Identifying the event

[`timestamp`](/documentation/SwiftUI/SpatialEventCollection/Event/timestamp)

The time the event was processed.

[`id`](/documentation/SwiftUI/SpatialEventCollection/Event/id-swift.property)

An identifier that uniquely identifies the event over its lifetime.

[`ID`](/documentation/SwiftUI/SpatialEventCollection/Event/ID-swift.struct)

A value that uniquely identifies an event over the course of its lifetime.

[`kind`](/documentation/SwiftUI/SpatialEventCollection/Event/kind-swift.property)

The event’s input source.

[`Kind`](/documentation/SwiftUI/SpatialEventCollection/Event/Kind-swift.enum)

The possible input sources or modes of an event.

[`modifierKeys`](/documentation/SwiftUI/SpatialEventCollection/Event/modifierKeys)

The set of active modifier keys at the time of this event.

### Locating the event

[`location`](/documentation/SwiftUI/SpatialEventCollection/Event/location)

The 2D location of the event.

[`location3D`](/documentation/SwiftUI/SpatialEventCollection/Event/location3D)

The 3D location of the touch.

[`selectionRay`](/documentation/SwiftUI/SpatialEventCollection/Event/selectionRay)

The 3D ray used to target the touch.

[`inputDevicePose`](/documentation/SwiftUI/SpatialEventCollection/Event/inputDevicePose-swift.property)

The 3D position and orientation of the device controlling the touch, if one exists.

[`InputDevicePose`](/documentation/SwiftUI/SpatialEventCollection/Event/InputDevicePose-swift.struct)

A pose describing the input device like a hand controlling the event.

[`targetedEntity`](/documentation/SwiftUI/SpatialEventCollection/Event/targetedEntity)

The entity target for this touch, if one exists.

### Getting the event’s current phase

[`phase`](/documentation/SwiftUI/SpatialEventCollection/Event/phase-swift.property)

The phase of the event.

[`Phase`](/documentation/SwiftUI/SpatialEventCollection/Event/Phase-swift.enum)

The states that an event can have.

## Relationships

### Conforms To

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

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

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

---

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)