Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 7 - UISlider thumbTIntColor does not change

I am trying to change the Color of the Thumb on my UISlider - Somehow though, it always stays white. Changing the Color of the Bar itself seems to work quite well.

- (void)viewDidLoad
{
  [super viewDidLoad];
  // Do any additional setup after loading the view.
  self.redSlider.thumbTintColor = [UIColor redColor];
}

Am I missing something here?

I also found this Question here, that indicates it could be a bug - any idea?

like image 742
Martin Lang Avatar asked Sep 27 '13 22:09

Martin Lang


1 Answers

Yes it's bug. To avoid without preparing dummy image use this code.

[s setThumbImage:s.currentThumbImage forState:UIControlStateNormal];
s.thumbTintColor = UIColor.redColor;
like image 189
Satachito Avatar answered Oct 20 '22 03:10

Satachito