Search code examples
iosuisegmentedcontrol

Deleselect uisegmentedcontrol selection after clicking on a save button


I'm using a 3 button UISegmented control for a choice selection. I also have a save button that retrieves the chosen control.

When the save button is clicked I want to have to UISegmentedcontrol cleared (ie the previous selected button unselected). I'm not looking for the setMomentary as I want the selection to stick but also be able to unselect it later.


Solution

  • [myUISegmentedControl setSelectedSegmentIndex:UISegmentedControlNoSegment];