UISwitch with custom image

niks picture niks · Sep 13, 2012 · Viewed 9k times · Source

I need to customize UISwitch by changing background color as well as knob(holder) image as shown in below image.Is it possible to customize UISwitch without app getting rejected.

enter image description here

Thanks in advance

Answer

user529758 picture user529758 · Sep 13, 2012

There's an onTintColor property you can set on UISwitch. If you need to change the handle image as well, have a look at DCRoundSwitch.