title: Dissmiss UITableViewController from button in TableViewCell
body: <p>I have a UITableViewController that has a header view class with a UIButton in it that I've linked up in interface builder. I've got it working fine so that when you tap the button the code fires. </p>
  
  <p>However, I have no idea what to write to dismiss the table view when you tap this button.</p>
  
  <pre><code>class headerCell: UITableViewCell {
      @IBAction func exit () {
          print("got pressed")
          // tried: MyTableView().dismiss(animated: true, completion: nil)
          // But did not work, did nothing?
      }
  }
  
  class MyTableView: UITableViewController {
  
  // All the code for the tableView is here...
  
  }
  </code></pre>