How do I switch UISegmentedControll
programmatically ?
The selectedSegmentIndex property identifies the selected segment of a UISegmentedControl. Set this property to the any valid segment index, or UISegmentedControlNoSegment (-1) to turn off the current selection.
// select the first segment
segmented.selectedSegmentIndex = 0;
// turn off the current selection
segmented.selectedSegmentIndex = UISegmentedControlNoSegment;