title: Refresh Container View holding UITableView - Swift
body: <p>I've <code>View Controller</code> which has a <code>Container View</code> , and the <code>Container View</code> is holding inside a <code>UITableView</code>.so the main class for <code>View Controller</code> which is <code>MainViewController</code> and the class for <code>UITableView</code> is <code>TableViewController</code></p>
  
  <p>What i have here is that i need to refresh <code>UITableView</code> in the <code>MainViewController</code>.
  I've found this code in objective-c but i tried converting it into swift but it didn't work : </p>
  
  <pre><code>UITableViewController *tbc = (UITableViewController *)self.childViewControllers[0];
  [tbc.tableView reloadData];
  </code></pre>
  
  <p>Swift code i tried but it didn't work:</p>
  
  <pre><code>  var tv : TableViewController = self.childViewControllers[0] as! TableViewController
      tv.myTableView.reloadData()
  </code></pre>
  
  <p>The error I'm getting is this :</p>
  
  <pre><code>Could not cast value of type 'UINavigationController' (0x1950dc0b0) to 'myapp. TableViewController' (0x10021c470).
  </code></pre>