Is there a way to reverse the UISlider values? The default is minimum on the left, and maximum on the right. Which I find curious as the iBooks brightness slider behaves the opposite.
I tried reversing the Minimum and Maximum integers I entered into Interface Builder Value fields, but it did not like this.
You're probly gonna have to go with a custom UISlider.
I have used custom UISlider, but I don't know how you reverse the values. The minimum value seems to always be applied to the far left position and the maximum value to the far right. Even if I set the value programmatically.
Is there a way to reverse the UISlider values? The default is minimum on the left, and maximum on the right. Which I find curious as the iBooks brightness slider behaves the opposite.
I tried reversing the Minimum and Maximum integers I entered into Interface Builder Value fields, but it did not like this.
Suggestions appreciated.
I have a simple solution, although I am sure you have already figured this out by now, due to the age of this thread.
I needed a vertical slider, so used the following command to rotate it.
I then needed the exact same thing as you...so rotated it another 90 degrees placing it in an upside down position. Slider is symetrical, so it looks exactly the same in both positions. But the min and max values are now the opposite.
TapTouchClick is right in both ways: Even though min max could easily be reversed by a simply math equation this will earn you a rejection with reason "... leads to user confusion" because the user expects the UISlider value to increase when moved towards the right side.
Just curious here: Why would you want to reverse the behaviour? Is there any special reason/idea behind it?
TapTouchClick is right in both ways: Even though min max could easily be reversed by a simply math equation this will earn you a rejection with reason "... leads to user confusion" because the user expects the UISlider value to increase when moved towards the right side.
Just curious here: Why would you want to reverse the behaviour? Is there any special reason/idea behind it?
In my case, using the math formula actually speeds up the animation, because the time...1.5 is reduced to 0.5 secs....so the animation speeds up.
And the slider, in the users eye does exactly what it should do.
left to right slide increases the animation speed.
The iBooks brightness slider works as every other slider, the minimum brightness is on the left, and maximum on the right, where's the confusion?
Don't confuse the values with the intended results. If you're trying to build a UISlider where the left is the larger value, the default UISlider settings are backwards.
For example, I don't think we're allowed to control the actual brightness of device's screen directly. So some people fake it by putting a dark view on top and set it's alpha. If you use the default UISlider settings, max brightness would be alpha of 0 (slide to the left) and min brightness would be alpha of 1 (slide to the right).
If you do this, your brightness control will be reversed from the user perspective compared with iBooks. Not ideal, and the reason for my question. It does work though, and my app was not rejected.
I then needed the exact same thing as you...so rotated it another 90 degrees placing it in an upside down position. Slider is symetrical, so it looks exactly the same in both positions. But the min and max values are now the opposite.