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;
I've had a similar problem where the segmented control wasn't changing.
I was calling "selectedSegmentIndex", etc too early. Once I called it after "viewDidLoad" was called then everything was fine again.
EDIT: as Yogesh Nikam Patil made me notice, UIControlEvents has been renamed from UIControlEvents to UIControl.Event. I've updated my code accordingly.
@arcady bob answer was the one that did the trick for me.
If you use just the first line, the segmented will react accordingly graphically, but your IBAction associated with the segmented control won't be called. In a few words: the second line is like tapping on the segmented control.
This is what I needed and what I was missing.