Re: Delay select recognition
Re: Delay select recognition
- Subject: Re: Delay select recognition
- From: Matt Neuburg <email@hidden>
- Date: Thu, 27 Jan 2011 11:48:50 -0800
On Thu, 27 Jan 2011 11:17:59 -0500, Phillip Mills <email@hidden> said:
>I'm not sure how that works. If my target action is called, then the double succeeded but how would I know it failed except through a dependent single succeeding? Should I be looking at the UIGestureRecognizerDelegate for that?
Sorry, I wasn't watching the preceding discussion, so forgive me if I'm missing the point.
Are you merely saying that you don't know how to tell the difference between a single tap and a double tap (when both are possible legal gestures)? The docs have explicit example code showing how to do this with delayed performance. When the first tap arrives, you set off a delayed performence; if the second tap arrives, you cancel it.
If you're using gesture recognizers, it's much easier: you send the single-tap recognizer +requireGestureRecognizerToFail:+, handing it the double-tap recognizer.
Apple has also requested, by the way, that you do neither of these, since they both involve latency. They would prefer that you make the single and doublt tap responses things where it would be okay if they *both* happened. But of course that's not always feasible, and even Apple often fails to obey this rule (as witness the latency when tapping a link in Mobile Safari, caused by wait to see whether the user is about to double-tap to zoom).
m.
--
matt neuburg, phd = email@hidden, <http://www.apeth.net/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.apeth.net/matt/default.html#applescriptthings_______________________________________________
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