<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ExclusiveGesture",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI16ExclusiveGestureV"
  },
  "title" : "ExclusiveGesture"
}
-->

# ExclusiveGesture

A gesture that consists of two gestures where only one of them can succeed.

```
@frozen nonisolated struct ExclusiveGesture<First, Second> where First : Gesture, Second : Gesture
```

## Overview

The `ExclusiveGesture` gives precedence to its first gesture.

## Topics

### Creating the gesture

[`init(_:_:)`](/documentation/SwiftUI/ExclusiveGesture/init(_:_:))

Creates a gesture from two gestures where only one of them succeeds.

[`first`](/documentation/SwiftUI/ExclusiveGesture/first)

The first of two gestures.

[`second`](/documentation/SwiftUI/ExclusiveGesture/second)

The second of two gestures.

### Supporting types

[`Value`](/documentation/SwiftUI/ExclusiveGesture/Value)

The value of an exclusive gesture that indicates which of two gestures
succeeded.

## Relationships

### Conforms To

[`Gesture`](/documentation/SwiftUI/Gesture)

---

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)