Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS How do I remove glow/shadow from UISlider

How do I remove the glow/shadow from this UISlider?

glow ghost

like image 434
Castles Avatar asked Jan 06 '23 05:01

Castles


2 Answers

It turns out, all I needed to do was set a custom thumb image and the shadow doesn't exist.

like image 97
Castles Avatar answered Jan 16 '23 21:01

Castles


I do this in the didSet of the UISlider (Swift 3):

@IBOutlet weak var slider: UISlider!{
    didSet{
        slider.setThumbImage(<image when not touched>, for: .normal)
        slider.setThumbImage(<image when touched>, for: .highlighted)
    }
}
like image 34
Rogare Avatar answered Jan 16 '23 21:01

Rogare