title: Delete row in TableView when I use UIActionSheet to confirm
body: <p>I use UIActionSheet to confirm for deleting row in TableView. I have 3 rows  but when I swap to delete first row, the first row not delete but the third row is deleted. After I continue to  delete first row again but second row is deleted. I don't know why. Please help me to resolve this small problem.</p>
  
  <pre><code>- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle
  forRowAtIndexPath:(NSIndexPath *)indexPath
  {
  
  if (editingStyle == UITableViewCellEditingStyleDelete)
  {
  
      UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:@"cancel" destructiveButtonTitle:@"Delete" otherButtonTitles: nil];
  
      [actionSheet showInView:self.view];
  
  }
  
  }
  
  
  
  
  
  -(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex{
  
  
  switch (buttonIndex) {
      case 0:
  
          [listOfName removeObjectAtIndex:self.selectedIndex];
           //selectedIndex = indexPath.row;
          [self viewWillAppear:YES];
  
  }
  
  
  }
  </code></pre>