0

I have a parent PageViewController and a child UIViewController.

Here's my intended behavior:

If user pans horizontally, turn the page to the next or previous UIViewController.

If user pans vertically, do the intended action within the UIViewController.

Right now the PanGestureRecognizer in the UIViewController intercepts all gestures, making it impossible to turn the page.

How can I conditionally intercept pan gestures that are horizontal?

Nick Barr
  • 554
  • 1
  • 7
  • 20
  • Good question. Show your pan gesture recognizer code (setup and action) and we might be able to tell you the answer. ;-) – Mundi Jan 26 '15 at 16:34
  • see answer from Hejazi in this SO:http://stackoverflow.com/questions/7100884/uipangesturerecognizer-only-vertical-or-horizontal – user523234 Jan 26 '15 at 16:58
  • @user523234 the reason I wasn't able to use Hejazi's answer is I never define a GestureRecognizer for the parent PageViewController — it just works out of the box. – Nick Barr Jan 27 '15 at 14:41

0 Answers0