Select the Segment not selected radio button.

I have a problem, I want my UISegment start all unselected when the application loads.

If anyone can help in this matter, I would be very grateful.

Regards.

+4
source share
3 answers

Or:

 [mySegmentControl setSelectedSegmentIndex:-1]; 

or

 [mySegmentControl setSelectedSegmentIndex:UISegmentedControlNoSegment]; 

All this in apple docs. Link: http://developer.apple.com/library/ios/#documentation/uikit/reference/UISegmentedControl_Class/Reference/UISegmentedControl.html

+13
source

In the beginning, after initializing the segmental control, you can use

 yourSegmentControl.selectedSegmentIndex=-1; 

it will remove any selected index.

I hope this helps

+2
source

Just uncheck Selected checkbox from property

+2
source

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


All Articles