<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/SpatialTapGesture/init(count:coordinateSpace:)-75s7q",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI17SpatialTapGestureV5count15coordinateSpaceACSi_xtcAA010CoordinateH8ProtocolRzlufc"
  },
  "title" : "init(count:coordinateSpace:)"
}
-->

# init(count:coordinateSpace:)

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

```
nonisolated init(count: Int = 1, coordinateSpace: some CoordinateSpaceProtocol = .local)
```

## Parameters

`count`

The required number of taps to complete the tap
gesture.

`coordinateSpace`

The coordinate space 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)