I have UITabBarController with NavigationController. Then i push a child VC onto Navigation controller li this:
let tabBarController = UITabBarController()
let navController = UINavigationController()
let vc = Registration_VC()
navController.addChildViewController(vc)
tabBarController.addChildViewController(navController)
self.presentViewController(tabBarController, animated: true, completion: nil)
So that works fine. Then I push another VC(same) onto navigation controller from 'Registration_VC()' like this:
let vc = Registration_VC()
self.navigationController?.pushViewController(vc, animated: true)
Works fine. However when I touch anywhere on the TabBar the current VC pops. I don't understand why.