<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/Gesture/handActivationBehavior(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI7GesturePAAE22handActivationBehavioryQrAA04HandeF0VF"
  },
  "title" : "handActivationBehavior(_:)"
}
-->

# handActivationBehavior(_:)

Customizes the activation behavior for a gesture when driven by hand
or hand-like input.

```
@MainActor @preconcurrency func handActivationBehavior(_ behavior: HandActivationBehavior) -> some Gesture<Self.Value>
```

## Parameters

`behavior`

The hand activation behavior to use for the gesture.

## Return Value

A new gesture with a preference to activate with the provided behavior.

## Discussion

Use [`automatic`](/documentation/SwiftUI/HandActivationBehavior/automatic) to allow a gesture to activate
with default system behaviors. Use [`pinch`](/documentation/SwiftUI/HandActivationBehavior/pinch) when
a gesture should only trigger when the hand is pinched.

For example, in a 3D chess application, a [`DragGesture`](/documentation/SwiftUI/DragGesture) that enables
movement of the pieces could use the pinch behavior to ensure that piece
movement is only possible when a hand is pinched in order to avoid
pushing the piece around by only touching it:

```
Model3D(named: "Pawn")
    .gesture(
        DragGesture()
            .handActivationBehavior(.pinch)
            .updating($chessDragState) { value, state, _ in
                // ...
            }
    )
```

---

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)