I have an app that runs perfectly on iOS 6. I\'ve set a blinking effect to a UISlider\'s thumb this way:
-(void)startBlinkingSlider{
isSliderBlinking = Y
I just so happened to read the iOS 7 UI Transition Guide
again this morning, and tripped on a statement under Slider
. If EITHER maximumTrackTineColor
OR thumbTintColor
are nil, then both properties are ignored. So I tried to set all the tint colors, thumb still white.
I entered a bug report on this - #15277127 - reference it if you enter your own bug. The more bug reports the more likely Apple will fix it soon.
EDIT: Apple duped my bug to another one - this was obviously known a while ago.
So far in Xcode 6.2, iOS 8.2 the problem is still there, and the workaround still works. Swift version:
slider.setThumbImage(slider.thumbImageForState(.Normal), forState:.Normal)
I discovered a workaround. By first calling the 'setThumbImage:forState:' method, the 'thumbTintColor' property will then take effect.
[self.slider setThumbImage:[UIImage imageNamed:@"Thumb.png"]
forState:UIControlStateNormal];
self.slider.thumbTintColor = [UIColor blackColor];
I tested this on Version 7.0 (463.9.4.2) of iOS Simulator.
On basis of @aaronsti's answer I found that the following worked for me. Setting thumb-image to nil
had no effect.
[_slider setThumbImage:[_slider thumbImageForState:UIControlStateNormal] forState:UIControlStateNormal];
_slider.minimumTrackTintColor = minTintColor;
_slider.thumbTintColor = thumbTintColor;