title: Switch target of UIGestureRecognizer mid-gesture?
body: <p>I have a scrollview within <code>ViewControllerA</code>. When a user is at the end of the scrollview during a pan gesture, it automatically transitions to <code>ViewControllerB</code> which has it's own scrollview. This transition works fine. However, after transitioning to <code>ViewControllerB</code> the pan gesture from <code>ViewControllerA</code> no longer exists (because now we're in <code>ViewControllerB</code>). This requires the user to lift their finger and then start another pan gesture to move <code>ViewControllerB</code>'s scrollview.</p>
  
  <p>What I want to happen is when a user is panning to the end of <code>ViewControllerA</code>'s scrollview, it continues scrolling <code>ViewControllerB</code>'s scrollview after the transition without the user lifting their finger if they are still in the middle of a pan gesture.</p>
  
  <p>One issue I know of is that scrollviews have their own pan gesture recognizer that is not settable.</p>
  
  <p>I have tried the following strategy with a delegate which doesn't currently work:</p>
  
  <pre><code>protocol MyPanGestureDelegate {
      func panInViewControllerB(gesture: UIPanGestureRecognizer)
  }
  
  class ViewControllerA: UIViewController {
      // ViewControllerB is assigned to 'gestureDelegate' below
      var gestureDelegate: MyPanGestureDelegate!
  
      override func viewDidLoad() {
          super.viewDidLoad()
          let panGesture = UIPanGestureRecognizer(target: self, action: #selector(panInViewControllerA(_:)))
          self.view.addGestureRecognizer(panGesture)
  
          gestureDelegate.panInViewControllerB(panGesture)
      }
  
  }
  
  class ViewControllerB: UIViewController, MyPanGestureDelegate, UIGestureRecognizerDelegate { 
      // 'myScrollView' is an IBOutlet for said scrollview
      func panInViewControllerB(panGesture: UIPanGestureRecognizer) {
          myScrollView.addGestureRecognizer(panGesture)
      }
  }
  
  // I've also set 'shouldRecognizeSimultaneouslyWithGestureRecognizer' to true
  </code></pre>
  
  <p>Is there a way to scroll a scrollview in one view controller, transition to another view controller, and continue scrolling a scrollview in another view controller all in one pan gesture?</p>