[slider setMaximumTrackTintColor: color]
has unexpected results in iOS 7.1 (the slider bar changes its position appearing at top instead of vertical center or disappears completely), while working fine with prior versions.
[slider setMinimumTrackTintColor: color]
does render the expected result.
This question might be related: UISlider setMaximumTrackTintColor, but no answer so far.
Update:
I get this: instead of:
Update #2:
Using setMaximumTrackImage
might work, but the solution I'm looking for is a way to set any random color and not a preexisting image.
Update #3:
This issue is still present in iOS 7.1.1.
Try this out:
Maybe a little bit late, but - here is the answer
You should read description of setter:
Also this applicable only for
maximum color
, becauseminimum
setter just change titntColor:This mean that slider use some image for maximum track and if u just set tint color nothing will be changes (nothing can't be tinted).
Solution (thanks to @user623396):
As result u will get
I've created 2px images with the colour of slider track.
And then I set they as tracking images (here's with thumb image for iPad and iPhone)
And that's all. Same solution as msmq I guess. And you can see both ways how to make a large image - two images way and scaling way.
Found this workaroud:
Create a 1x1px
UIImage
from aUIColor
on the fly:and then
Looks like an expensive solution but it gets the job done.
Update
Reported this bug and it's already well known. Hopefully they will fix it soon...