Hello :)
If you start out customizing the UISlider with graphics, you must set at least 3 pieces of graphics.
Right and left side of the trackbar and the thumb image:
Here is how I did it the last time I used the UISlider:
CGRect frame = CGRectMake(20.0f, 6.0, 280.0f, 20.0f);
UISlider *customSlider = [[UISlider alloc] initWithFrame:frame];
[customSlider addTarget:self action:@selector(sliderMove:) forControlEvents:UIControlEventValueChanged];
[customSlider addTarget:self action:@selector(sliderStart:) forControlEvents:UIControlEventTouchDown];
[customSlider addTarget:self action:@selector(sliderEnd:) forControlEvents:UIControlEventTouchUpInside];
[customSlider addTarget:self action:@selector(sliderEnd:) forControlEvents:UIControlEventTouchUpOutside];
// in case the parent view draws with a custom color or gradient, use a transparent color
customSlider.backgroundColor = [UIColor clearColor];
UIImage *stetchLeftTrack = [[UIImage imageNamed:@"slider.png"]
stretchableImageWithLeftCapWidth:10.0 topCapHeight:0.0];
UIImage *stetchRightTrack = [[UIImage imageNamed:@"slider_right.png"]
stretchableImageWithLeftCapWidth:10.0 topCapHeight:0.0];
[customSlider setThumbImage: [UIImage imageNamed:@"slider-knop.png"] forState:UIControlStateNormal];
[customSlider setMinimumTrackImage:stetchLeftTrack forState:UIControlStateNormal];
[customSlider setMaximumTrackImage:stetchRightTrack forState:UIControlStateNormal];
I my optics it does not make sense to have a highlighted state for the UISlider, or any other state, your finger will likely cover the thumb image, so the user will never see it.
I am not sure it just extends from UIButton and maybe it can't handle it?