Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当用户在触摸结束时滑动滑块时,我想触发一个计时器。有没有办法处理uislider的触摸事件?
确保滑块的continuous属性设置为YES; 然后使用-addTarget:action:forControlEvents:with... UIControlEventValueChanged?... 以通常的方式。滑块应该不断调用你给它的任何动作方法。
continuous
YES
-addTarget:action:forControlEvents:
UIControlEventValueChanged
我将连续属性设置为 NO 并保留 UIControlEventValueChanged 并且它设法仅在用户释放滑块时触发事件