UISlider - missing features - snap, tooltip and ticks

前端 未结 2 865
再見小時候
再見小時候 2021-01-28 04:32

So I am new to IOS dev and Xcode but far from being a newbie in UI components in many other technologies. I am implementing a UISlider and investigated its API but could not fin

2条回答
  •  忘了有多久
    2021-01-28 05:20

    1 + 2) Yes, there is no built-in snap functionality, but you can implement it yourself easily. Just catch the value-changed events of the slider, and update its value to the desired value. The action method for rounding the slider values can update a label displaying the value, too.

    2 + 3) You must implement that by yourself. These features are very use case specific. UIKit is rather than a set of small building blocks for general purposes.

提交回复
热议问题