I got an app in which I allocate 5 UISegmentedControl dynamically into the view. And got a Done button at the end. My condition that to proceed into next step (when done button is pressed), all the UISegmentControls “should be selected by user”.
The default selection in segmentcontrol is none.
How to check whether all the UISegmentedControls in my view is selected by the user before action on the done button is executed?
Right from the apple document, this should answer your question:
Discussion
The default value is
UISegmentedControlNoSegment(no segment selected) until the user touches a segment.Hope you can use that to check whether the value is user selected or not, to prevent going to next page.