Tap Gesture on animating UIView not working
<p>I have a tap gesture on a UILabel who's translation is being animated. Whenever you tap on the label during the animation there's no response from the tap gesture.</p>
<p>Here's my code:</p>
<pre><code>    label.addGestureRecognizer(tapGesture)

    label.userInteractionEnabled = true
    label.transform = CGAffineTransformMakeTranslation(0, 0)

    UIView.animateWithDuration(12, delay: 0, options: UIViewAnimationOptions.AllowUserInteraction, animations: { () -&gt; Void in
        label.transform = CGAffineTransformMakeTranslation(0, 900)
        }, completion: nil)
</code></pre>
<p>Gesture code:</p>
<pre><code>func setUpRecognizers() {
    tapGesture = UITapGestureRecognizer(target: self, action: &quot;onTap:&quot;)
}
func onTap(sender : AnyObject) {
    print(&quot;Tapped&quot;)
}
</code></pre>
<p>Any ideas? Thanks :)</p>
<hr />
<h1>Note added for 2021:</h1>
<p>These days this is dead easy, you just override hitTest.</p>