Search code examples
iphonecocoa-touchuitableviewuisegmentedcontroluiswitch

Selecting between two options?


On the options screen of my current application I want to allow the user to select whether units are displayed in either "Metric" or "Imperial". I have looked at the Google Maps application and they do this using a grouped UITableView, this does not really work for my application as I am presenting various configuration options from an "Options" tab on a ITabBar.

enter image description here

I have looked at segment control, which seems quite good, but on reading the Apple HIG I noticed that each segment when tapped is designed to display a different view.

enter image description here

I guess I could also go with a default and then use a UISwitch to toggle the alternate option.

enter image description here

My question is: What is the best way to do this in a none UITableView, is there a control that I am missing, any help / info would be much appreciated.


Solution

  • You will be just fine using the segmented control, I've seen many applications that use it for selection, and I've used it in several applications as well where a tableView just didn't fit.

    You could also look into a UIPicker, but segmented control has the advantage of setting an option in a lesser amount of taps, which is always a welcome usability trait.