IPhone application: it is possible to use the "double" slider to select a price range

I am working on an iphone application (not a web application) and I would like to create a form asking the user to specify a price range. Instead of using two text fields, I would prefer to use a double slider to set the minimum and maximum prices. I know that you can use a simple slider (for example, sound), but I have never seen a double. Can anyone help?

+5
source share
3 answers

This is not possible without creating a custom control. You need to inherit from UIControl or UIView and provide your own drawRect method. You will also need to respond to touch and drag events to update the state of the control. I didn’t do it myself, but I would be ready for quite a lot of work so that everything would react and display as expected.

I am curious why you need to have both values ​​indicated on the same slider? Why not use two sliders, side by side or folded? This will not require any additional input steps than the double slider, and will comply with more standard user interface recommendations.

+4
source

, , UISlider, , , MacOSX. Code Addict , , , - , , .

0

All Articles