开发者

Scrollwheel as UISlider replacement

开发者 https://www.devze.com 2023-03-09 12:16 出处:网络
How can 开发者_StackOverflow社区I integrate a Scrollwheel into my application? I\'m currently using Sliders but have found them to be sometimes difficult to control exactly (for example with a linear

How can 开发者_StackOverflow社区I integrate a Scrollwheel into my application?

I'm currently using Sliders but have found them to be sometimes difficult to control exactly (for example with a linear scale from 0% to 100%). I guess they weren't designed for that purpose and are meant to be used for cases where not pitch perfect control is ok (Volume Control and the likes). However, I really need an exact way of inputting data (other than TextFields, they won't work in my case).

I figured that a Scrollwheel kind of UI Element would be perfect for me. Are there any opensourced Scrollwheels available that would fit my needs?

  • Horizontal, just like Sliders
  • Variable Start and End Values
  • Variable Scale
  • Small in height
  • Pretty :)

I tried using the Picker but that didn't work for me since it shows it's values inside of it, which makes it both big and not pretty to look at when used multiple times inside of one View.

If there's nothing available that fulfills my needs (described above) could someone please give me a hint on how to start effectively with creating such a UI element? Thanks!


I've finally found something which fits my needs :)

OBSlider, a subclass of UISlider which allows variable scrubbing speeds – it imitates the behavior seen while scrubbing in iPod.app.

Fulfills all my needs:

  • Horizontal
  • Variable Start and End Values
  • Variable Scale
  • Small in height
  • Pretty :)
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号