• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cocoa Touch: Accessory view never calls "up outside" action?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa Touch: Accessory view never calls "up outside" action?


  • Subject: Re: Cocoa Touch: Accessory view never calls "up outside" action?
  • From: Matt Neuburg <email@hidden>
  • Date: Wed, 13 Jul 2011 10:31:23 -0700

On Sun, 10 Jul 2011 00:54:08 -0700, "email@hidden" <email@hidden> 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 = email@hidden, <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 (email@hidden)

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:

This email sent to email@hidden

  • Prev by Date: Re: Reading old NSArchiver serialization, expecting CGRect, finding {?={?=ff}{?=ff}}
  • Next by Date: Re: Reading old NSArchiver serialization, expecting CGRect, finding {?={?=ff}{?=ff}}
  • Previous by thread: Cocoa Touch: Accessory view never calls "up outside" action?
  • Next by thread: What is the UTI incantation to get document packages to work in 10.6?
  • Index(es):
    • Date
    • Thread