简体   繁体   中英

UISegmentedControl reset programmatically

I have a UISegmentedControl that loads other UIViewController's. When going back, I want to see it unselected. I tried setting selectedSegmentIndex=-1 and selected=NO, but they didn't work. Any suggestions?

试试这个:

[self.mySegmentedControl setSelectedSegmentIndex:UISegmentedControlNoSegment];

在安装过程中,试试这个:

segmControl.momentary = YES;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM