Search code examples
ioscustomizationuiswitch

Custom UISwitch?


For the past three days I have been trying to roll my own UISwitch because it is customized with a custom image for the actual switch button and a custom image for the track. So far it has resulted in bugs and ugly code and it just does not work well.

Since I don't want to re-invent the wheel, are there any ways or libraries that I can use that allow me to customize a UISwitch with my own UIImage's?


Solution

  • This is an almost-complete UISwitch-like control. Since it's opensource, you can subclass/modify it in order to customize it using images.

    https://github.com/domesticcatsoftware/DCRoundSwitch