On Sun, 10 Jul 2011 00:54:08 -0700, "mlist0...@gmail.com" <mlist0...@gmail.com> 
said:
>I'm using a UIButton subclass as an accessory view in a table cell. I create 
>the button in my cell's initWithStyle:reuseIdentifier: method, as shown below.
>
>Here's the problem: I touch inside my button, but even when I drag my finger 
>out of the button and lift up, it's my "up inside" action that gets called, 
>not my "up outside" action as I expect. 

Actually it's the same for any UIButton - and for any UIControl that implements 
these actions. There's a secret distance value; you have to be that far away 
from the UIControl when you lift your finger before "up inside" changes to "up 
outside". To put it another way, the notion "inside" is generously large; it 
doesn't correspond to your intuitions about what the word "inside" normally 
means.

With an ordinary default roundrect UIButton you can see how far away this 
distance is, because if you tap on the button and then move your finger away 
from the button, there comes a moment where it suddenly changes from 
highlighted to unhighlighted. You've just crossed the secret line.

m.

--
matt neuburg, phd = m...@tidbits.com, <http://www.apeth.net/matt/>
A fool + a tool + an autorelease pool = cool!
Programming iOS 4!
http://www.apeth.net/matt/default.html#iosbook_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to