<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/SpatialTapGesture/init(count:coordinateSpace3D:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI17SpatialTapGestureV5count17coordinateSpace3DACSi_xtc0C0010CoordinateH1DRzlufc"
  },
  "title" : "init(count:coordinateSpace3D:)"
}
-->

# init(count:coordinateSpace3D:)

Creates a tap gesture with the number of required taps and the
coordinate space of the gesture’s location.

```
nonisolated init(count: Int = 1, coordinateSpace3D: some CoordinateSpace3D)
```

## Parameters

`count`

The required number of taps to complete the tap
gesture.

`coordinateSpace3D`

The coordinate space 3D of the tap
gesture’s location.

---

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)