The amount to increment or decrement value each time the user clicks or taps the stepper’s plus or minus button, respectively. Defaults to 1.
onEditingChanged
A closure that’s called when editing begins and ends. For example, on iOS, the user may touch and hold the increment or decrement buttons on a Stepper which causes the execution of the onEditingChanged closure at the start and end of the gesture.
Discussion
議論
Use Stepper(_:value:step:onEditingChanged:) to create a stepper with a custom title that increments or decrements a binding to value by the step size you specify.
In the example below, the stepper increments or decrements the binding value by 5 each time the user clicks or taps on the control’s increment or decrement buttons, respectively: