本文介绍了三重UISwitch的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想创建一个有三个位置的自定义UISwtich。是否可能?
I want to create a custom UISwtich with three positions. Is it possible?
推荐答案
如果你想要使用 UISegmentedControl
标准UI元素或配置范围为2的 UISlider
:
You should be using UISegmentedControl
if you want a standard UI-Element or configure a UISlider
with a range of 2:
slider.minimumValue = 0;
slider.maximumValue = 2;
slider.continuous = NO;
然后设置 minimumValueImage
c $ c> maximumTrackImage 和 thumbImage
即可使用适当的图片。
And then set the minimumValueImage
, maximumTrackImage
and thumbImage
to use appropriate images.
这篇关于三重UISwitch的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!