I need to create a Slider that moves in steps. On a scale of 0 to 100 units, you can move in 5 steps of 20 units. I tried to do it with the Slider class that comes by default in Xcode. I had thought to round the value when I moved the Slider to the next step, but it does not work.
Currently I have the code inserted into an IBAction method that is called when I have moved the Slider like this:
int paso = 100 / 5;
[slider setValue:roundf(slider.value/paso)*paso];