title: Set table view into editing mode
body: <p>I have a <code>UITableView</code> in a <code>UIViewController</code> and have added an edit button from code rather than IB. This comes with <code>UITableViewControllers</code> but not UIVCs. How can I get this button to put the table view into editing mode in swift? Thanks in advance for any help.</p>
  
  <pre><code>class WordsViewController: UIViewController, UITableViewDataSource, UITableViewDelegate, UITextFieldDelegate  {
    override func viewDidLoad() {
      super.viewDidLoad()
      self.navigationItem.rightBarButtonItem = self.editButtonItem()
    }
  
    func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -&gt; Bool {
          return true
    }
  }
  </code></pre>