开发者

Change value of a segmented control?

开发者 https://www.devze.com 2023-02-05 22:22 出处:网络
How do i change the开发者_JS百科 value of a segmented control through code?UISegmentedControl *cont;

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

0

精彩评论

暂无评论...
验证码 换一张
取 消