title: UIscrollview and drag and drop
body: <p>I'm creating a kind of grid view where you can add some widgets inside of it and organise them as you want by drag and drop to rearrange them.
  My grid view for now is a UIscroll view and the widgets are subclass of UIview. </p>
  
  <p>Here is an example of grid you can have with that 
  When I drag a widget I wanna be able to make the scroll view go down if the widget is near the bottom of the screen.
  For now, my widgets have a UIPanGestureRecognizer
  And the following code :</p>
  
  <pre><code> func enterDragMode(recognizer:UIPanGestureRecognizer) {
  
      if (recognizer.state == UIGestureRecognizerState.Ended) || (recognizer.state == UIGestureRecognizerState.Cancelled) {
          gridNotificationCenter.postNotificationName("WidgetDragEnded", object: self)
          // Notify the grid and drop the widget here
      } else {
          var translation  = recognizer.translationInView(self.superview!)
          var newPoint = self.center
          newPoint.x += translation.x
          newPoint.y += translation.y
  
          if (CGRectContainsRect(moveDownRect, self.frame)) {
              var scrollview = self.superview as? UIScrollView
              if (scrollview != nil) {
                // need to find correct visible rect here 
                res!.scrollRectToVisible(visibleRect, animated: true)
              }
          }
          recognizer.setTranslation(CGPointZero, inView: self.superview)
      }
  }
  </code></pre>
  
  <p>But i feel like I'm not using the right class to handle this properly since the callback is not triggered when I'm simply holding the view and not moving it. Is there a better way ?</p>