---
title: RotateGesture
framework: swiftui
role: symbol
role_heading: Structure
path: swiftui/rotategesture
---

# RotateGesture

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

## Declaration

```swift
nonisolated struct RotateGesture
```

## Overview

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:) modifier. Add a rotate gesture to a 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:)](swiftui/rotategesture/init(minimumangledelta:).md)
- [init(minimumAngleDelta:inputKinds:)](swiftui/rotategesture/init(minimumangledelta:inputkinds:).md)
- [minimumAngleDelta](swiftui/rotategesture/minimumangledelta.md)

## Relationships

### Conforms To

- [Gesture](swiftui/gesture.md)

## See Also

### Recognizing gestures that change over time

- [gesture(_:)](swiftui/view/gesture(_:).md)
- [gesture(_:isEnabled:)](swiftui/view/gesture(_:isenabled:).md)
- [gesture(_:name:isEnabled:)](swiftui/view/gesture(_:name:isenabled:).md)
- [gesture(_:including:)](swiftui/view/gesture(_:including:).md)
- [DragGesture](swiftui/draggesture.md)
- [WindowDragGesture](swiftui/windowdraggesture.md)
- [MagnifyGesture](swiftui/magnifygesture.md)
- [RotateGesture3D](swiftui/rotategesture3d.md)
- [GestureMask](swiftui/gesturemask.md)
