I want to set thumb of like musi app here is ss
I want
I have
Here is code
durationSlider.setThumbImage(UIImage(named: "Slider_indicator.png"), forState: UIControlState.Normal)
durationSlider.setThumbImage(UIImage(named: "Slider_indicator.png"), forState: UIControlState.Highlighted)
If you want to clip the top part of the thumbImage, you should use:
So add this to your code:
And set the
CGRect
of thethumbRect
to have the value ofdurationSlider.frame.origin.y
as its ownorigin.y
.Here's another temporary solution, I'll get back to the
thumbRectForBounds
method shortly:here you want to show only below part of the thumb now. so you need to make above half image clear. Please check the image i have attached with the answer
Try this and download scale the image if you need