title: What is the proper way to delete rows from a UITableView - Swift
body: <p>In Objective-C I have used the following code when deleting a row from a tableView and it works just fine.</p>
  
  <p><strong>Objective-C Example</strong></p>
  
  <pre><code>-(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
  {
      [self.arrayName removeObjectAtIndex:indexPath.row];
      [self.tableName reloadData];
  }
  </code></pre>
  
  <p>I recently made a search to see how this was done in Swift and I noticed that most of the code I found is different than what I used before.</p>
  
  <p><strong>Swift Example</strong></p>
  
  <pre><code>func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) {
      if editingStyle == UITableViewCellEditingStyle.Delete {
        numbers.removeAtIndex(indexPath.row)    
        tableView.deleteRowsAtIndexPaths([indexPath], withRowAnimation: UITableViewRowAnimation.Automatic)
     }
  }
  </code></pre>
  
  <p>So now the question is, have I been doing it wrong or both ways are ok?</p>
  
  <p>What is the correct way in either language (Swift or Objective-C)?</p>