title: Swift: How to return to the initial view controller if there is no navigation controller
body: <p>I have been using the XLPagerTabStrip to effectively create a tab bar at the top of my view controller, with multiple child view controllers displayed within it (source : <a href="https://github.com/xmartlabs/XLPagerTabStrip" rel="nofollow">https://github.com/xmartlabs/XLPagerTabStrip</a>)</p>
  
  <p>Lets call these child view controllers A1, B1 and C1. Within the child view controllers are table views which once tapped segues all the child view controllers to a new view controller (A2). I want to be able to get from A2 back to the first view controller. I have tried add a navigation bar to all the child view controllers and using the navigationController?.popToRootViewControllerAnimated(true) method, but when a button containing this code is pressed nothing happens. I have also tried embedding a navigation controller within the initial view controller hosting the child view controllers, but this also doesnt work (not sure if this is because the child view controllers A1, B1 and C1 are not connected to the mother view controller within the storyboard).</p>