Some gestures aren't working right away

Steve Mills

I have an iOS app that's giving me a pain. One view hierarchy has a scroll view, page view, and other views. The storyboard has 3 gesture recognizers scattered among a couple of the view controllers. The code has a few shouldBeRequiredToFailByGestureRecognizer and shouldRequireFailureOfGestureRecognizer delegate methods. The problem I'm seeing is that right after I segue to this view hierarchy and attempt to use one particular gesture (long press with 1 tap), it doesn't even get the gestureRecognizerShouldBegin message, but eventually seemingly times out and other gestures will fire, such as my single tap gesture or the page view's next page gesture. But after doing ANY gesture, this gesture behaves like it should.

I've tried logging all the pairs of gesture recognizers sent to all of the delegate methods. The strange thing is that the logged pairs of gesture recognizers is different on that first attempt to use the gesture in question than it is on every other time.

I was hoping the Simulator or Xcode had some sort of gesture debugging, like a way to spit out info about which gesture recognizers were attempted, failed, skipped, etc. But nope. So, what things can I try? I'm at a loss.

Steve Mills
Drummer, Mac geek

Join to automatically receive all group messages.