I have a tab bar controller. In that the first tab is a navigation controller. Lets call it controller A. I am then pushing another view controller on it. Lets call it controller B. After that I am presenting view controller C from View controller B. Now I want to dismiss only the view controller B.
Tab Bar - A(Navigation Controller's root vc) -> Push VC -> B -> Present VC -> C
A to B is going using self.navigationController.pushViewController(animated: true, completion: nil)
B to C is going like thislet vc = CViewController()
vc.modalPresentationStyle = .fullScreen
self.present(vc,animated: true,completion: nil)
Now When I use
self.dismiss(animated: true, completion: nil)
in View Controller C. It goes back to the root view controller i.e vc A. I want it to go to VC B.