Detect second click on a segment

我们两清 提交于 2019-12-14 02:51:55

问题


According to the documentation, the event which should related to UISegmentedControl is value changed. Assuming I have a segmented control with previous and next, in my case I should be able to click next more than one time, the default behaviour of UISegmentedControl will not recognize the successif second click on same segment. SO how to deal with that?


回答1:


Set the momentary property of your UISegmentedControl to TRUE.

You can do that in code or in Interface Builder (there is a checkbox in the Attributes Inspector).



来源:https://stackoverflow.com/questions/16328993/detect-second-click-on-a-segment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!