So I've added a thumb image to my custom UISlider
like this:
self.setThumbImage(UIImage(named: "POITicker"), for: .normal)
But as you can see it's not centered. How can I adjust the image so that the the thumb is centered to the center of the circle?
CodePudding user response:
It's your custom slider, so override thumbRect(forBounds:...)
; that's what it's for.
Obviously, use a transparent background instead of the green shown here.