Set the Segment control unselected Set the Segment control unselected xcode xcode

Set the Segment control unselected


Either:

[mySegmentControl setSelectedSegmentIndex:-1];

or:

[mySegmentControl setSelectedSegmentIndex:UISegmentedControlNoSegment];

It's all in the apple docs too.Ref: http://developer.apple.com/library/ios/#documentation/uikit/reference/UISegmentedControl_Class/Reference/UISegmentedControl.html


Just uncheck Selected checkbox from property


At the start after initializing your segmentedcontrol you can use

yourSegmentControl.selectedSegmentIndex=-1;

it will erase any selected index.

I hope it helps