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

# init(count:inputKinds:)

Creates a tap gesture with the number of required taps and the
input kinds the gesture recognizes.

```
nonisolated init(count: Int = 1, inputKinds: GestureInputKinds = .all)
```

## Parameters

`count`

The required number of taps to complete the tap
gesture.

`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)