title: How to implement scrollViewDidScroll: method?
body: <p>I'm building an article reading app.List of articles is in <code>UITableViewController</code>,I'm facing an issue when i use <code>scrollViewDidScroll:</code> method first cell of table is display under the <code>UINavigationBar</code>.<br>But when commented this code it displays fine means first cell exactly after the <code>UINavigationBar</code>.</p>
  
  <p>here is my code:</p>
  
  <pre><code>- (void)scrollViewDidScroll: (UIScrollView*)scroll {
      // UITableView only moves in one direction, y axis
  
      CGFloat currentOffset = scroll.contentOffset.y;
      CGFloat maximumOffset = scroll.contentSize.height - scroll.frame.size.height;
  
      // Change 10.0 to adjust the distance from bottom
      if (maximumOffset - currentOffset  &lt;= -60.0) {
          x++;
          [self LoadMore];
  
          [self.tableView addInfiniteScrollingWithActionHandler:^{
  
          }];
  
          [self.tableView reloadData];    
      }
  }
  </code></pre>