开发者

A question about UISegmentedControl

开发者 https://www.devze.com 2023-03-11 04:34 出处:网络
It seems that UISegmentedControl objects only send out \"UIControlEventValueChanged\" events.Is it possible to make them emit \"UIControlEventTouchDown\" events also ?

It seems that UISegmentedControl objects only send out "UIControlEventValueChanged" events. Is it possible to make them emit "UIControlEventTouchDown" events also ?

Have tried to right click the control in IB and then connect the "UIControlEventTouchDown" event option to an 开发者_开发问答IBAction method, but no event is sent out. Have also tried to do it in code using an "action : @selector" statement but also no event.

In both cases, when I change the event to "UIControlEventValueChanged", the event is sent out as expected.

Hope that somebody who is knowledgeable on this can help ...


You could use the addGestureRecognizer: method inherited from UIView

0

精彩评论

暂无评论...
验证码 换一张
取 消