Swift UI special training-stepper micro-control parts

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.