If I set numberOfTapsRequired to 2 on a UITapGestureRecognizer, then the user has a certain amount of time after his first tap to tap again to trigger my recognizer. Does anyone know how to find out the exact amount of time allowed?
By analogy, in Cocoa, NSEvent has the doubleClickInterval class method. I’m looking for an equivalent in iOS for UITapGestureRecognizer
And the answer is: 0.35 seconds, at least as of today on iOS 5.1.
I created a test application that used a pair of tap recognizers to recognize both single and double taps to update a pair of UIlabels. I then used Instruments UI automation to repeatedly send double taps with progressively more time between the taps. At 0.34 seconds, a series of taps is recognized as a double tap, but at 0.35 seconds, they’re recognized as single taps.
This is very much like Lou’s suggestion, but different in that I needed to use Instruments. I could find no way to simulate a user tap within UIKit.