Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set UISlider's thumb image in storyboard

Tags:

ios

xcode5

slider

I realize you can do this in code like:

UIImage *thumbImageNormal = [UIImage imageNamed:@"SliderThumb-Normal"];
[self.slider setThumbImage:thumbImageNormal forState:UIControlStateNormal];

But is there not a way to set in the storyboard? I see the settings for Min and max (image below) but not for the thumb? Am I just missing something obvious here?

enter image description here

like image 681
Wesley Smith Avatar asked Mar 22 '23 00:03

Wesley Smith


1 Answers

The answer would be NO.
"I see the settings for Min and max (image below) but not for the thumb?"

The images you set for Min & max would be supplementary images for your slider. They will appear in left/right of your slider. If you want to customize trackBar, you would change Min & Max tint. Same you can do for Thumb too. You can change tint for all three in IB, but to change thumb image, either write the same code you listed above, or hope that it would be included in next update of XCode & wait till then .. :P
MeanWhile, have a look at this

like image 155
Prince Agrawal Avatar answered Apr 11 '23 02:04

Prince Agrawal