title: How to add "Load more" page when scrolling to bottom of table
body: <p>I'm trying to figure out the best way to handle paging or a "Load More..." when scoll to bottom in a UItableView.
  I'm loading this data from a web service, that's pretty flexible, giving me a pagesize and page parameter. Pagesize defines the number of results pulled back each time, whereas the page parameter defines groups of search results, for example:</p>
  
  <p>page=1 (returns results 1-10).</p>
  
  <p>page=2 (returns results 11-20)</p>
  
  <p>Each time, when scroll down to bottom, i request to server 1 time and server will give me 1 page(1, 2, 3, 4 ....) and result.
  i tried to load like this</p>
  
  <pre><code>-(void)scrollViewDidScroll:(UIScrollView *)scrollView
  {
      CGFloat height = scrollView.frame.size.height;
  
      CGFloat contentYoffset = scrollView.contentOffset.y;
  
      CGFloat distanceFromBottom = scrollView.contentSize.height - contentYoffset;
      if(distanceFromBottom &lt; height)
      {
          //to do something
          [self.viewController getPics];
      }
  
  }
  </code></pre>
  
  <p>I'm not really sure how to tackle this. Any help would be great. Thanks in advance.</p>