Castles
Castles

Reputation: 947

iOS How do I remove glow/shadow from UISlider

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

glow ghost

Upvotes: 4

Views: 2577

Answers (2)

Rogare
Rogare

Reputation: 3274

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)
    }
}

Upvotes: 2

Castles
Castles

Reputation: 947

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

Upvotes: 7

Related Questions