<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/RotateGesture",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI13RotateGestureV"
  },
  "title" : "RotateGesture"
}
-->

# RotateGesture

A gesture that recognizes a rotation motion and tracks the angle of the
rotation.

```
nonisolated struct RotateGesture
```

## Overview

A rotate gesture tracks how a rotation event sequence changes. To
recognize a rotate gesture on a view, create and configure the gesture,
and then add it to the view using the [`gesture(_:including:)`](/documentation/SwiftUI/View/gesture(_:including:))
modifier.

Add a rotate gesture to a [`Rectangle`](/documentation/SwiftUI/Rectangle) and apply a rotation effect:

```
struct RotateGestureView: View {
    @State private var angle = Angle(degrees: 0.0)

    var rotation: some Gesture {
        RotateGesture()
            .onChanged { value in
                angle = value.rotation
            }
    }

    var body: some View {
        Rectangle()
            .frame(width: 200, height: 200, alignment: .center)
            .rotationEffect(angle)
            .gesture(rotation)
    }
}
```

## Topics

### Creating the gesture

[`init(minimumAngleDelta:)`](/documentation/SwiftUI/RotateGesture/init(minimumAngleDelta:))

Creates a rotation gesture with a minimum delta for the gesture to
start.

[`init(minimumAngleDelta:inputKinds:)`](/documentation/SwiftUI/RotateGesture/init(minimumAngleDelta:inputKinds:))

Creates a rotation gesture with a minimum delta for the gesture to
start, and the input kinds the gesture recognizes.

[`minimumAngleDelta`](/documentation/SwiftUI/RotateGesture/minimumAngleDelta)

The minimum delta required before the gesture succeeds.



---

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)