Open Source: UISwitch Replacement To Make Beautiful Custom Switches Easy

The UISwitch component has very few options that can be customized.  There are some libraries out there that allow you to customize things, but often you end up having to do a lot of the redesign yourself in order to get things to look good.

I’ve come across a library that allows you to create a custom switch which can be used as an almost drop-in replacement for the UISwitch component which looks very similar – although a little bit better with rounded edges, and can easily be customized to accomodate large text strings, and scaled to different sizes.

What I really like about this component is that everything is done using Core Graphics so you don’t have to do any graphics design work yourself, and no matter what adjustments you make things still look good, even if you decide to go for a giant sized switch.

Here’s a short video of the component in action:

The component is DCRoundSwitch from Domestic Cat Software the same guys who made the previously mentioned DCIntrospect library for easy debugging of Cocoa Touch interfaces.

You can find the Github here:
https://github.com/domesticcatsoftware/DCRoundSwitch

A good component to keep in mind in case so you don’t have to ever find yourself fiddling around making custom switches.

©2011 iPhone, iOS 4, iPad SDK Development Tutorial and Programming Tips. All Rights Reserved.

.

DeliciousTwitterTechnoratiFacebookLinkedInEmail


Leave a Reply

Your email address will not be published. Required fields are marked *