Reputation: 1921
Please define what is the difference between segment controls and switches?
Where are they are used?
I'm a new developer, please help me.
Upvotes: 0
Views: 588
Reputation: 3409
If you want to have a detailled view about the iOS interface, I would suggest you to read Apple Human Interface Guidelines for iOS.
Upvotes: 2
Reputation: 96947
A segmented control lets you choose from a number of options, like a radio button control on a web page. You can specify the labels of a segmented control.
A switch lets you choose between two options: On and Off. You cannot rename the labels of a switch, at least without testing the limits of Apple's private API restriction. However, as a bonus, the labels are localized — the labels match the language that the iPhone is set up to use.
The control you pick will depend on whether the switch (as designed) is sufficient for your needs, i.e. you only need a binary option, and you're okay with the labels.
A segmented control is much more flexible, but it has a different appearance from the switch. You also have to pick its colors carefully, because a darker colored segmented control can make it difficult to distinguish the selected segment from the unselected segments. You also have to do your own localization.
Upvotes: 3