title: popToRootViewControllerAnimated is not updating UITableView
body: <p>I'm working on small CoreData program with one UITableView with embedded Navigation controller and UIViewController, where to add the CoreData.</p>
  
  <p><img src="https://i.stack.imgur.com/QoQDn.png" alt="enter image description here"></p>
  
  <p>The problem is that I can't figure out how to reload the data in the table after press the save button.</p>
  
  <p>I have tried to use popToRootViewControllerAnimated(true) in the @IBAction func buttonSavePressed(sender: UIBarButtonItem), but this just send me to the TableView without reloading the data.</p>
  
  <pre><code>    @IBAction func buttonSavePressed(sender: UIBarButtonItem) { 
  
      self.navigationController?.popToRootViewControllerAnimated(true)
  </code></pre>
  
  <p>}</p>
  
  <p>I have also tried self.navigationController?.showViewController(contractsView, sender: storyboard) but this create another view in the stack, not the original, if I can explained like this.</p>
  
  <pre><code>    @IBAction func buttonSavePressed(sender: UIBarButtonItem) {
  
     let contractsView = self.storyboard?.instantiateViewControllerWithIdentifier("ContractsTableViewControllerStoryboardID") as ContractsTableViewController
  
      self.navigationController?.showViewController(contractsView, sender: storyboard) 
  </code></pre>
  
  <p>}</p>
  
  <p>I am new with the programming, which means that I can not aways ask the right questions. So I am posting the code, which is in working stage without comments - sorry</p>
  
  <p>//  ContractsTableViewController.swift</p>
  
  <p>import UIKit
  import CoreData</p>
  
  <p>class ContractsTableViewController: UITableViewController {</p>
  
  <pre><code>//, UITableViewDelegate, UITableViewDataSource
  
  var totalContracts = 0
  
  @IBOutlet var tableContracts: UITableView!
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
      var appDel = (UIApplication.sharedApplication().delegate as AppDelegate)
      var context = appDel.managedObjectContext!
  
      var request = NSFetchRequest(entityName: "Contract")
      request.returnsObjectsAsFaults = false
  
      totalContracts = context.countForFetchRequest(request, error: nil)
      println(totalContracts)
  
  }
  
  override func didReceiveMemoryWarning() {
      super.didReceiveMemoryWarning()
  
  }
  
  override func numberOfSectionsInTableView(tableView: UITableView) -&gt; Int {
      return 1
  }
  
  override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
      return totalContracts
  }
  
  override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
  
      let cell: UITableViewCell = UITableViewCell(style: UITableViewCellStyle.Subtitle, reuseIdentifier: "Default")
  
      var appDel = (UIApplication.sharedApplication().delegate as AppDelegate)
      var context = appDel.managedObjectContext!
  
      var request = NSFetchRequest(entityName: "Contract")
      request.returnsObjectsAsFaults = false
  
      var results: NSArray = context.executeFetchRequest(request, error: nil)!
  
      var thisContract = results[indexPath.row] as Contract
  
      cell.detailTextLabel!.text = "From" + " " + thisContract.stratdate + " " + "to" + " " + thisContract.enddate
      cell.textLabel!.text = thisContract.workingdays + " " + "days" + " " + "as" + " " + thisContract.position + " " + "on" + " " + thisContract.ship
  
      return cell
  }
  
  override func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -&gt; Bool {
      return true
  }
  
  override func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) {
  
      let cell: UITableViewCell = UITableViewCell(style: UITableViewCellStyle.Subtitle, reuseIdentifier: "Default")
  
      var appDel = (UIApplication.sharedApplication().delegate as AppDelegate)
      var context = appDel.managedObjectContext!
  
      var request = NSFetchRequest(entityName: "Contract")
      request.returnsObjectsAsFaults = false
  
      var results: NSArray = context.executeFetchRequest(request, error: nil)!
  
      context.deleteObject(results[indexPath.row] as NSManagedObject)
      context.save(nil)
      totalContracts = totalContracts - 1
      tableContracts.reloadData()
  
  }
  </code></pre>
  
  <p>}</p>