title: Custom UITableViewCells not showing correct data from UITableView in iOS
body: <p>I have a custom <code>UITableViewController</code> which has passed to it an <code>NSArray</code> containing <code>NSArrays</code> containing <code>NSDictionarys</code>. For now (until I get this working) the <code>NSDictionary</code> objects just have "id" and "value" elements.</p>
  
  <ul>
  <li><p>The <code>UITableViewController</code> uses a custom <code>UITableViewCell</code> which for the time being only has a label in it.</p></li>
  <li><p>Also, for the sake of simplicity for the time being, all the <code>NSDictionary</code> objects contain only numbers for the "value" so I can track what's going on easier. So array[0][0] has "1-1", array[1][0] has "2-1" and counting up.</p></li>
  </ul>
  
  <p><strong>The Problem:</strong></p>
  
  <p>The table rows are sized such that I can only see 3 rows initially. When I scroll the 4th row is displayed correctly with "4-1". However, while following the code I noticed that the 5th row is not initialized properly.</p>
  
  <pre><code>CustomCell *cell = (CustomCell *)[tableView dequeueReusableCellWithIdentifier:@"CellIdentifier"];
  if (cell == nil) {
      cell = [[[CustomCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"CellIdentifier"] autorelease];
  
      NSDictionary *temp = [tmp objectAtIndex:0];
      cell.descriptionLabel.text = [temp objectForKey:@"value"];
      cell.delegate = self;
  }
  </code></pre>
  
  <p>I noticed that the "cell" object does not come back nil and is already initialized. It displays "1-1" in the label instead of "5-1".</p>
  
  <p>Anybody have any idea why? I wouldn't think it has to do with the same cell identifier names being used.</p>
  
  <p>Help is much appreciated.</p>