views:

40

answers:

1

Im trying to "get" when a finger/touch leaves a UIButton in objective C for iphone. I was told in another answer to use UIControlEventTouchDragExit however this event only fires when the touch gets about 100 pixels away from the button, whereas I would like it to be immediate. The apple docs say that goes according to the bounds however my understand is the bounds and the frame are the same unless you rotate the UIbutton (or whatever)

+2  A: 

The extra area is a built-in feature, to account for the inexactness of using a finger to interact with the interface. If you want to get around this, you have to subclass UIControl and override -(BOOL)beginTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)eventand related methods to get the behavior your want.

Felixyz
well no thanks to the documentation which says the bounds are used :)Thanks
Jonathan
Hmmm, that's good to know. Thanks!
progrmr
Just to say that I had to use `-(BOOL)continueTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event`
Jonathan