Hello I have tab bar controller with 5 elements. When I press the last one there are bunch of buttons which needs to show another view controller and then when I press second time to that tab bar button it needs to be revert its first condition (bunch of buttons) it is like a navigator. I tried to use following code:
let destinationVC = self.storyboard?.instantiateViewController(withIdentifier: "third") as? ThirdVC
self.tabBarController?.present(destinationVC!, animated: true, completion: nil)
However, view controller appears in a new screen and my tab bar controller is gone. How can I open my view controller above tab bar controller? Is it possible to do it ?
self.tabBarController?.navigationController?.present(destinationVC!, animated: true, completion: nil)
- Neel BhasintabBarController.addChildViewController(vc)
- Neel Bhasin