Change value of a segmented control?
How do i change the开发者_JS百科 value of a segmented control through code?
UISegmentedControl *cont;
.....
cont.selectedSegmentIndex = 4; //Selected index you want;
[segmentedControl setSelectedSegmentIndex:(NSInteger)]
You can change the segment control value by using property selectedSegmentIndex
For Ex. segmentedControlObject.selectedSegmentIndex=1;
For Tutorial you can refer this
精彩评论