Search code examples
iphoneobjective-ciossubclassuiswitch

Re-create UISwitch


My client doesn't like the gloss on the iOS 5 UISwitch, and wants me to create a non glossy version using some images. However I don't know how I would go a bouts this.

I have created a UIView Subclass and I don't know what to do next.

Any suggestions as to what I need to do next?


Solution

  • You can recreate UISwitch using CoreGraphics (without using images).

    Have a look at this: DCRoundSwitch

    DCRoundSwitch is designed to be a drop in replacement for UISwitch.

    In any case you should create a UIControl subclass!