With the slider corresponding to the stepper micro-control, sometimes we need to precisely change, then we can not use the slider to do, stepper each time with a fixed value to increase or decrease, its setting is more similar to the slider than:
There is also the minimum and current value of the maximum value, the difference is that the step value, which is the fixed value when we add and subtract, is called a step. It behaves in three ways:
AutoRepeat is press and hold auto repeat
Continuous is a continuous trigger value change event
Wrap is reversed when the extremum is reached and is unchecked by default.
Its usage is very similar to the slider, let's make it simple:
@IBAction func sp (sender:uistepper) { Label1.Text = "\ (sender.value) } @IBOutlet weak var label1:uilabel!
The effect is as follows:
One thing to keep in mind is that if you hold it down, the value will bounce faster and faster.
Swift UI special training-stepper micro-control parts