title: How to limit the pulling distance with a refresh control?
body: <p>I'm trying to loading some data in a <code>UITableView</code> using a <code>UIRefreshControl</code>. I did,</p>
  
  <pre><code>- (void)scrollViewDidScroll:(UIScrollView *)scrollView
  {
  
      // Get the current size of the refresh controller
      CGRect refreshBounds = refreshControl.bounds;
  
      // Distance the table has been pulled &gt;= 0
      CGFloat pullDistance = MAX(0.0, -self.newsTableView.contentOffset.y);
  
      // Half the width of the table
      CGFloat midX = self.newsTableView.frame.size.width / 2.0;
  
      CGFloat spinnerHeight = self.compass_spinner.bounds.size.height;
      CGFloat spinnerHeightHalf = spinnerHeight / 2.0;
  
      CGFloat spinnerWidth = self.compass_spinner.bounds.size.width;
      CGFloat spinnerWidthHalf = spinnerWidth / 2.0;
  
      // Set the Y coord of the graphics, based on pull distance
      CGFloat spinnerY = pullDistance / 2.0 - spinnerHeightHalf;
  
      // Calculate the X coord of the graphics, adjust based on pull ratio
      CGFloat spinnerX = (midX - spinnerWidthHalf);
  
      // When the compass and spinner overlap, keep them together
      self.isRefreshIconsOverlap = YES;
  
      // If the graphics have overlapped or we are refreshing, keep them together
      if (self.isRefreshIconsOverlap || refreshControl.isRefreshing) {
          spinnerX = midX - spinnerWidthHalf;
      }
  
      CGRect spinnerFrame = self.compass_spinner.frame;
      spinnerFrame.origin.x = spinnerX;
      spinnerFrame.origin.y = spinnerY;
  
      self.compass_spinner.frame = spinnerFrame;
  
      // Set the encompassing view's frames
      refreshBounds.size.height = pullDistance;
  
      self.refreshColorView.frame = refreshBounds;
      self.refreshLoadingView.frame = refreshBounds;
  
      // If we're refreshing and the animation is not playing, then play the animation
      if (refreshControl.isRefreshing &amp;&amp; !self.isRefreshAnimating) {
          [self animateRefreshView];
      }
  }
  </code></pre>
  
  <p>using this code I can pull down the table view to bottom of the screen. My UIRefresControl like</p>
  
  <pre><code> // Initialize Refresh Control
  refreshControl = [[UIRefreshControl alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 20)];
  
  // Configure Refresh Control
  [refreshControl addTarget:self action:@selector(refresh:) forControlEvents:UIControlEventValueChanged];
  </code></pre>
  
  <p>To refresh using this, I need to drag like 1/2 of the screen. How may I refresh this in a short drag(pull)?</p>