title: problems with deleting a cell of a table
body: <p>in my table (<code>UITableView</code>) I use cells with a <code>UITextField</code> istead of <code>UILabel</code>, added to the cell by "addSubview". I need this, because I want my cells to become directly be editable. As cell-style I use <code>UITableViewCellStyleDefault</code>. - Everything works fine: I can add and edit cells whenever I want.</p>
  
  <p>However, deleting makes a problem: When I "delete" a cell and make a <code>reloadData</code> ot the table, the cell still displays its old content, together with the new one. Also the same for all cells below it. When I close my app and start it again, the table is displayed correctly.</p>
  
  <p>Here the code I use to delete the cell</p>
  
  <pre><code>- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle 
                                              forRowAtIndexPath:(NSIndexPath *)indexPath {
  
  NSUInteger row = [indexPath row];
  NSUInteger count = [datas count];
  
  if (row &lt;= count) {
  
      NSString* data = [datas objectAtIndex: [indexPath row]];
      [self deleteDatas:data];
  }
  
  [self.locationTable reloadData];
  </code></pre>
  
  <p>}</p>
  
  <p>Where in <code>deleteDatas</code> I just delete the corresponding datas from a file, which works correctly, as "prooved" by new loading the app. </p>
  
  <p>Here</p>
  
  <pre><code> -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  
  static NSString *CellIdentifier = @"Cell";    
  UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
  
  if (cell == nil) {
      cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
      UILongPressGestureRecognizer *longPressGesture = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longPress:)];
      longPressGesture.minimumPressDuration = 2.0;
      [cell addGestureRecognizer:longPressGesture];
  }
  
  // Configure the cell.
  
  // table cell with uitextfield instead of lable.
  UITextField* textField = [[UITextField alloc] initWithFrame:CGRectMake(10, 10, 185, 30)];
  textField.enabled = NO;
  [cell.contentView addSubview:textField];
  
  NSUInteger count = [datas count];
  NSUInteger row = [indexPath row];
  
  // last cell is empty to edit it
  if (row+1 &lt; count) {
  
      textField.text = [datas objectAtIndex:[indexPath row]];
      [cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator];
  }
  
  return cell;
  </code></pre>
  
  <p>}</p>
  
  <p>Any idea? - Thanks </p>
  
  <p>Any idea, why my cell shows twice the content (once of the original cell and once the content of the cell below?) - I think s.th. is wrong with reloading the cell. - Is it possible that the textfield makes problems? - How can I figure this out?</p>