UISegmentedControl deselect (make none of the segments selected)

前端 未结 8 2185
我寻月下人不归
我寻月下人不归 2021-02-01 01:30

in fact the title contains my question. I have a UISegmentedControl, and need to deselect currently selected tab. I tried:

[menu setSelectedSegmentIndex:-1];
         


        
8条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-01 01:44

    You can now do this in xcode 6 in the interface builder:

    Deselect the 'Selected' option under segmented control behaviour in attributes inspector.

提交回复
热议问题