samvermette.com

MAY 30, 2011

SVSegmentedControl

Back when I was designing Shows, I spent a lot of time thinking how I was going to make the user switch between the “artists” and “dates” views. UISegmentedControl seemed like the most logical way to go, except that I, as many others, feel that it poorly indicates which segment is selected.

So I decided to make my own:

It’s basically a UISwitch but with text labels. The thumb moves to the selected segment, and since it only has 2 segments, it lets you toggle between the 2 with a single tap, just like an UISwitch. But all in all, it remains a segmented control that allows you to switch between views.

The same situation showed up again a couple weeks ago with Transit. Digging up Shows’ old code, I decided to push this a step further and make SVSegmentedControl. It doesn’t have the fancy glow effect, but it’s very much customizable. It also supports more than 2 segments, which means it’s basically a replacement for UISegmentedControl. Enjoy!

Fun fact: couple months ago, the first builds of Lion featured redesigned segmented controls that looked (they did get pulled off) just like this (except for how they animate). To me, this was a demonstration of 2 things: 1: Apple is slowly but surely closing up the gap between iOS and Mac OS X; and 2: UISwitch and UISegmentedControl are alike (i.e. I’m not crazy).


hello@samvermette.com