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

# init(count:coordinateSpace:inputKinds:)

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

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

## Parameters

`count`

The required number of taps to complete the tap gesture.

`coordinateSpace`

The coordinate space of the tap gesture’s
location.

`inputKinds`

A set of input kinds that this gesture recognizes.
If not specified, the gesture will recognize all applicable input
kinds that a person can use to perform it.

---

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)