A segmented control displays a list of options that a user can choose from. Each segment sort of looks like a button; the segments remains “pressed” even after the user lifts his or her finger.
You can detect when a different segment is selected and also what corresponding value in an array (that you supply) is referenced by the selected segment. Here is an example…