title: Make 'edit' button trigger edit-mode on UITableView
body: <p>This might be a very stupid question, but I have very little knowledge about Xcode, Objective-C and iOS development in general.</p>
  
  <p>What I have is a UITableViewController, with a number of cells. I've gotten the 'add' and delete (swipe to delete) functions to work, but I cannot figure out how to connect the 'edit' button to a function that will trigger the editing mode of that TableView, so I can rearrange the order of the elements. </p>
  
  <p>I have un-commented these functions:</p>
  
  <pre><code>- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath
  {
      // Return NO if you do not want the item to be re-orderable.
      return YES;
  }
  
  - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath
  {
      XYZToDoItem *itemToMove = [self.toDoItems objectAtIndex:fromIndexPath.row];
      [self.toDoItems removeObjectAtIndex:fromIndexPath.row];
      [self.toDoItems insertObject:itemToMove atIndex:toIndexPath.row];
      [self.tableView reloadData];
  }
  </code></pre>
  
  <p>As you can see I have also made a few additions to the moveRowAtIndexPath method following the documentation.</p>
  
  <p>In addition there are these functions;</p>
  
  <pre><code>- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
  {
      if (editingStyle == UITableViewCellEditingStyleDelete) {
          // Delete the row from the data source
          [self.toDoItems removeObjectAtIndex:indexPath.row];
          [self.tableView reloadData];
      }
  }
  
  - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
  {
      // Return NO if you do not want the specified item to be editable.
      return YES;
  }
  </code></pre>
  
  <p>As previously stated the "swipe to delete" function works, I don't know how, but I simply just uncommented these last two methods and edited one a bit to fit my code. </p>
  
  <p>To be more specific, what I'm asking is how can I link the 'edit' button I have in my Navigation Controller to trigger the edit mode for the TableView, thereby showing the three lines (?) known from the TableViews editing mode (and letting me drag the elements to an order I want).</p>
  
  <p>Thanks in advance for all your help! :)</p>