title: Moving view controller based on pan gesture in scrollview
body: <p>Right now I have a scrollView that takes up the entire view controller. The code below is able to move the scrollView around but I want to move the whole view controller around. How would I do that?</p>
  
  <pre><code>override func viewDidLoad() {
          pan = UIPanGestureRecognizer(target: self, action: "handlePan:")
          self.scrollview.addGestureRecognizer(pan)
  }
  
  func handlePan(recognizer:UIPanGestureRecognizer!) {
  
      switch recognizer.state {
      case .Changed:
          handlePanChanged(recognizer); break
      case .Ended:
          handlePanTerminated(recognizer); break
      case .Cancelled:
          handlePanTerminated(recognizer); break
      case .Failed:
          handlePanTerminated(recognizer); break
      default: break
      }
  }
  
  func handlePanChanged(recognizer:UIPanGestureRecognizer!) {
      if let view = recognizer.view {
          var translation = recognizer.translationInView(self.view)
          println("moving")
          view.center = CGPointMake(view.center.x, view.center.y + translation.y);
          recognizer.setTranslation(CGPointZero, inView: self.view)
      }
  }
  </code></pre>
  
  <p>I've tried different variations of "self.view.center ...." "UIApplication.sharedApplication.rootViewController.view.center.." etc.</p>