---
title: "digitalCrownRotation(_:from:through:sensitivity:isContinuous:isHapticFeedbackEnabled:onChange:onIdle:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/digitalcrownrotation(_:from:through:sensitivity:iscontinuous:ishapticfeedbackenabled:onchange:onidle:)"
---

# digitalCrownRotation(_:from:through:sensitivity:isContinuous:isHapticFeedbackEnabled:onChange:onIdle:)

Tracks Digital Crown rotations by updating the specified binding.

## Declaration

```swift
nonisolated func digitalCrownRotation<V>(_ binding: Binding<V>, from minValue: V, through maxValue: V, sensitivity: DigitalCrownRotationalSensitivity = .high, isContinuous: Bool = false, isHapticFeedbackEnabled: Bool = true, onChange: @escaping (DigitalCrownEvent) -> Void = { _ in }, onIdle: @escaping () -> Void = { }) -> some View where V : BinaryFloatingPoint

```

## Parameters

- `binding`: A binding to a value that updates when the user rotates the Digital Crown.
- `minValue`: Lower end of the range reported.
- `maxValue`: Upper end of the range reported.
- `sensitivity`: How much the user needs to rotate the Digital Crown to move between two integer numbers.
- `isContinuous`: Controls if the value reported stops at minValue and maxValue, or if it should wrap around. Default is false.
- `isHapticFeedbackEnabled`: Controls the generation of haptic feedback when turning the Digital Crown. Default is true.
- `onChange`: A block that is called as the Digital Crown is rotated.
- `onIdle`: A block that is called when the Digital Crown has settled to an idle state.

## Discussion

Discussion Use this method to receive continuous values on a binding you provides as the user turns the Digital Crown on Apple Watch. The example below receives changes to the binding value, starting at the minValue of 0.0  up to the maxValue of 10.0 settling in to multiples of 0.1 increasing or decreasing depending on the direction that the user turns the Digital Crown, rolling over if the user exceeds the specified boundary values: struct DigitalCrown: View {     @State private var crownValue = 0.0     @State private var minValue = 0.0     @State private var maxValue = 10.0     @State private var velocity = 0.0     @State private var isIdle = true

var body: some View {         Text("Received Value:\(crownValue, specifier: "%.2f")")             .focusable()             .digitalCrownRotation($crownValue,                                   from: minValue,                                   through: maxValue,                                   sensitivity: .low,                                   isContinuous: true             ) { crownEvent in                 isIdle = false                 velocity = crownEvent.velocity             } onIdle: {                 isIdle = true             }     } }

## See Also

### Interacting with the Digital Crown

- [digitalCrownAccessory(_:)](swiftui/view/digitalcrownaccessory(_:).md)
- [digitalCrownAccessory(content:)](swiftui/view/digitalcrownaccessory(content:).md)
- [digitalCrownRotation(_:onChange:onIdle:)](swiftui/view/digitalcrownrotation(_:onchange:onidle:).md)
- [digitalCrownRotation(detent:from:through:by:sensitivity:isContinuous:isHapticFeedbackEnabled:onChange:onIdle:)](swiftui/view/digitalcrownrotation(detent:from:through:by:sensitivity:iscontinuous:ishapticfeedbackenabled:onchange:onidle:).md)
- [digitalCrownRotation(_:)](swiftui/view/digitalcrownrotation(_:).md)
- [digitalCrownRotation(_:from:through:by:sensitivity:isContinuous:isHapticFeedbackEnabled:)](swiftui/view/digitalcrownrotation(_:from:through:by:sensitivity:iscontinuous:ishapticfeedbackenabled:).md)
- [DigitalCrownEvent](swiftui/digitalcrownevent.md)
- [DigitalCrownRotationalSensitivity](swiftui/digitalcrownrotationalsensitivity.md)
