问题
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