Reputation: 502
I changed thumb image for UISlider
. Now I have 2 visual issues:
Here are 3 positions of the same slider:
Upvotes: 1
Views: 309
Reputation: 7466
I think the problem is with the size of the pointerImage that probably contains some alpha on sides. Please verify that the pointer image is only 2-3 points wide.
Plus I see some artefact on the tracker image, it is probably not made correctly resizable via resizableImageWithCapInsets: method. that cause its leading end to be deformed.
Here's code that works and does exactly what you want without any glitches:
[self.slider setThumbImage:[UIImage imageNamed:@"slider"] forState:UIControlStateNormal];
[self.slider setMinimumTrackTintColor:[UIColor darkGrayColor]];
Obviously the @"slider" being the name of the point image in Xcode image assets. And you can put any color there , you don't have to use the built-in dark gray.
Upvotes: 1