UISlider returns two Touch Up Inside events, why does that happen?

Posted by willc2 on Stack Overflow See other posts from Stack Overflow or by willc2
Published on 2009-06-30T11:26:08Z Indexed on 2010/04/01 17:13 UTC
Read the original article Hit count: 434

Filed under:
|
|

I have a slider that I'm using to set a float value somewhere. I connect Value Changed to a method in my viewController. That part works fine.

I need to know when the user starts touching the control but not necessarily every single instant that the slider changes (I receive the Value Changed events for that). So I connected a Touch Up Inside event to another method in the viewController.

The problem it, that method gets called twice when the user touches the UISlider control. WTF? It doesn't work that way with UIButtons or other touch events like Touch Down.

I can work around it, I think, but it seems like a bug in the way the slider control handles touches. Does anybody know why it happens?

BTW: the double touch event happens even when Touch Up Inside is the only connected event.

© Stack Overflow or respective owner

Related posts about iphone-sdk

Related posts about cocoa-touch