title: limiting the panning bounds of UIPanGestureRecognizer
body: <p>I have a view that I am currently hiding at the bottom of the screen. Now I want to be able to move the view by scrolling it vertically, through the y-axis. But I don't want it to go up further than full height of the view (i.e: I don't want to see a white space at the bottom). I've written this code:</p>
  
  <pre><code>- (IBAction)panHighlightReadingVC:(UIPanGestureRecognizer *)recognizer
  {
      CGPoint translation = [recognizer translationInView:self.view];
  
      CGPoint newCenter = CGPointMake(self.view.bounds.size.width / 2,
                                      roundf(recognizer.view.center.y + translation.y));
  
      CGFloat velocityY = [recognizer velocityInView:self.view].y;
      if ((recognizer.view.frameY &gt; self.view.frameHeight - recognizer.view.frameHeight || velocityY &gt; 0)) {
          recognizer.view.center = newCenter;
          [recognizer setTranslation:CGPointZero inView:self.view];
      } 
  }
  </code></pre>
  
  <p>This sort of work, if I scroll it slowly. If I scroll it very fast, then there is a chance that the frameY of the view is less than the `superView.frameHeight - recognizer.view.frameHeight. How do I fix this?</p>