简体   繁体   中英

How to set the UISlider slide range?

How to set the UISlider slide range? If the UISlider'range is [0,100],How to set the UISlider slide between range[10,90]?

Many thanks~

Try this :

_slider.minimumValue = minValue;
_slider.maximumValue = maxValue;

_slider.value = yourValue;

Say your slider is named "slider"

You would just do :

slider.minimumValue = 10;
slider.maximumValue = 90;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM