我有一个标签栏控制器。其中第一个选项卡是导航控制器。让我们称它为控制器 A。然后我将另一个视图控制器推到它上面。让我们称它为控制器 B。之后我从视图控制器 B 呈现视图控制器 C。现在我只想关闭视图控制器 B。
选项卡栏 - A(导航控制器的根 vc)-> Push VC -> B -> Present VC -> C
A到B正在使用self.navigationController.pushViewController(animated: true, completion: nil)
B到C是这样的
let vc = CViewController()
vc.modalPresentationStyle = .fullScreen
self.present(vc,animated: true,completion: nil)
现在,当我
self.dismiss(animated: true, completion: nil)
在视图控制器 C 中使用时,它会返回到根视图控制器,即 vc A。我希望它转到 VC B。