UISegmentedControl reset programmatically

I have a UISegmentedControl that loads another UIViewController. Upon returning, I want him not to be chosen. I tried to set selectedSegmentIndex = -1 and selected = NO, but they did not work. Any suggestions?

+4
source share
2 answers

Try the following:

[self.mySegmentedControl setSelectedSegmentIndex:UISegmentedControlNoSegment]; 
+6
source

During setup, try the following:

 segmControl.momentary = YES; 
+1
source

Source: https://habr.com/ru/post/1386783/


All Articles