I have a Form (scrollable) that contains 2 inputs as a Picker and a Stepper where frequency is an enum and time an Int.
struct ConfigurationView: View {
@Bindable
var configuration: ConfigurationModel
var body: some View {
NavigationStack {
Form {
Picker(.frequency, selection: $configuration.frequency) { /* ... */ }
Stepper(value: $configuration.time, in: 1...8) {
// Stepper Label
}
.focusable()
Button(.save) { configuration.save() }
.buttonStyle(.borderedProminent)
.listRowBackground(Color.clear)
}
.navigationTitle(.configuration)
}
}
}
The main issue I'm facing is a delay in the UI (1-3 seconds) while interacting with the Digital Crown over the focused Stepper which prints a Crown Sequencer warning:
Crown Sequencer was set up without a view property. This will inevitably lead to incorrect crown indicator states
This mainly happens when the Picker, which is showed as a modal or Sheet, changes its value, so the Stepper no longer gets focusable again.
Looking into the docs, lectures and WWDC videos I just found that we need to provide a some sort of a focus, that's why the Stepper control has a focusable() modifier.
I don't know if there is an overlap between the scroll and the focus event on the control.