如何使用UISlider以及如何在特定值上设置滑块? [英] how to use the UISlider and how to set the slider on a particular values?

查看:82
本文介绍了如何使用UISlider以及如何在特定值上设置滑块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我第一次使用UIslider. 首先,我想知道如果值的范围是0到10,如何对滑块正值进行门控:

i am using an UIslider first time. first i want to know how to gat value of slider positon if the range of value is 0 to 10:

第二秒,我希望将滑块设置为5个不同的值. 像1,2,3,4,5

second i want my slider just set at 5 different values . like 1, 2, 3, 4, 5

滑块不应在标签值之间设置

slider should not set between the labeled value

推荐答案

我按照本教程进行了学习,这非常有帮助,您可以在代码中设置一些变量,例如最大数量以及每次滑块增加多少.链接: http://www.xprogress.com/post-35-uislider-tutorial-example-how-to-use-slider-in-iphone-sdk-xcode/

I followed this tutorial for mine and it was very helpful there are variables you can set in the code such as max number and how much the slider increases each time. Link: http://www.xprogress.com/post-35-uislider-tutorial-example-how-to-use-slider-in-iphone-sdk-xcode/

这篇关于如何使用UISlider以及如何在特定值上设置滑块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆