UISlider evaluate the result once they have stopped changing the value

三世轮回 提交于 2019-12-10 19:09:02

问题


I have a UI slider that is continuous. I take the value as it changes and use it to calculate a value that i put into a textfield.

I have the value changed outlet linked to the method that does the calculation and that works ok but i also want a method to fire once the user lifts off the slider that effectively gives a once time evaluation of the final set value.

I have tried connecting the the did end on exit method and others available .


回答1:


Use the UISlider's UIControlEventTouchUpInside event and, if necessary the UIControlEventTouchUpOutside event. These events will be triggered when the user lifts their finger off the UISlider. Which one is called will depend on whether the finger is inside or outside the bounds of the UISlider when it is lifted.



来源:https://stackoverflow.com/questions/7758876/uislider-evaluate-the-result-once-they-have-stopped-changing-the-value

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!