title: My UITableView has duplicated rows
body: <p>Im not sure why, but my UITableView, which isnt anything fancy, is showing repeating rows when it shouldnt be.</p>
  
  <p>It seems that the rows that get added when the user scrolls  (i.e. the rows that are off the screen to start with) are getting the data for the wrong row index. Its almost like when a new cell is de-queued, it's using a cell that 'was' used, but wasn't cleaned up correctly.</p>
  
  <p>Do you need to 'clean up' cells that are de-queue so that new cells dont use cells that are already created?</p>
  
  <p>my code is as below:</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
      static NSString *CustomCellIdentifier = @"CustomCellIdentifier";
  
      MyDayCell *cell = (MyDayCell *)[tableView 
                                        dequeueReusableCellWithIdentifier: CustomCellIdentifier];
  
      if (cell == nil) { 
          NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"MyDayCell" owner:self options:nil];
  
          for (id oneObject in nib) 
              if ([oneObject isKindOfClass:[MyDayCell class]])
                  cell = (MyDayCell *)oneObject;
  
      } 
  
      NSUInteger section = [indexPath section];
      NSUInteger row = [indexPath row]; 
      NSArray *thisSectionItems = (NSArray*)[self.listData objectForKey: [[NSNumber alloc] initWithInt:section]];
      MyDayDetails *rowData = [thisSectionItems objectAtIndex:row]; 
  
      //setup my cells data here...
  
      return cell;
  }
  </code></pre>
  
  <p>Is there anything wrong with this code?</p>
  
  <p>has anyone seen anything like this before?</p>