I noticed that UISlider in iOS7 behaves differently than it did in iOS 6 and iOS 5:
Say you have a slider with min=0 and max=10, current value is 0. When you first touch the "knob", a valueChanged message is sent with slider.value=0.269 (instead of the expected 0) and the knob moves towards the middle. Generally, touching the slider moves it towards the middle value (5 in this example), the farther out from the middle it currently is, the more it moves.
All this did not happen in iOS6, and I'd like to restore the old behaviour, but have no idea how to achieve this.
On iOS 9 you need to set for .Normal, .Selected and .Highlighted states to work. I found this after 5h of struggling. Way to go Apple!
[_sliderView setThumbImage:[UIImage imageNamed:@"knob"] forState:UIControlStateNormal];
[_sliderView setThumbImage:[UIImage imageNamed:@"knob"] forState:UIControlStateSelected];
[_sliderView setThumbImage:[UIImage imageNamed:@"knob"] forState:UIControlStateHighlighted];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With