remove UISwitch thumb shadow effect - swift

Viewed 1061

I'm trying to remove shadow effect exists on UISwitch. Is there any way to remove this shadow effect?

enter image description here

2 Answers

It seems using thumbTintColor removes shadow effect

For Swift 3/4:

Use

yourSwitch.thumbTintColor = .clear

For Objective-C

yourswitch setThumbTintColor: [UIColor clearColor];

Hope that works for you.

Related