title: UITableView willDisplayCell - something strange is going on
body: <p>I have my datasource (productsArry) which is populated via SQLite and I'm fetching 25 items at a time. I'm calling the 'willDisplayCell' UITableView delegate and when the indexPath.row is equal to the productsArry count it will fetch new data and reload the tables view. This works great with no problems but lets say if the datasource has 100 objects, which are being displayed in the tableview and then the productsArry has been filtered with less objects (say 50) and do a reloadData, which is fine again, but the problem is within the willDisplayCell delegate. For some reason this method is being called without the user scrolling. So it thinks cell 25 has been scrolled too so now it will fetch the next set of rows from the database. It will keep on doing this until it reaches the 100 objects from the last set of data or theres nothing else to fetch from the filter.</p>
  
  <pre><code>- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell    forRowAtIndexPath:(NSIndexPath *)indexPath
  {
      if (([self.productsArry count] != 0) &amp;&amp; (indexPath.row == [self.productsArry count])) 
      {
          self.currentOffset += TableviewRowCount;
          [self performSelector:@selector(reloadTableView:) withObject:nil afterDelay:0.2];
      }
  }
  
  - (void)reloadTableView:(id)sender
  {
      NSLog(@"reloadtable");
      [self fetchData];
      [self.productTableView reloadData];
  }
  </code></pre>
  
  <p>Please let me know if you need to know anything else that might help to clear things up.</p>