【发布时间】:2017-11-23 23:31:08
【问题描述】:
我的主视图控制器是 Tabbarcontroller
- 我从标签栏导航到 (A) Viewcontroller (TabarViewcontroller -> A(视图控制器)
- 从 A(视图控制器)我推送 (B) 视图控制器
- 从 B(视图控制器)我呈现 (C) 视图控制器
- 当我关闭 (c) 视图控制器时,我想显示 (A) 视图控制器 或(主页)TabbarviewController
所以,我想首先关闭呈现的视图控制器,然后我想弹出我之前推送的控制器
这是我的导航流程
From Tabbarviewcontroller
1- let aVC = self.storyboard?.instantiateViewController(withIdentifier: "a") as! OrderListingViewController
self.navigationController?.pushViewController(aVC, animated: true)
From A viewcontroller
2- let bVC = self.storyboard?.instantiateViewController(withIdentifier: "b") as! OrderListingViewController
self.navigationController?.pushViewController(bVC, animated: true)
From B viewcontroller
let cVC = self.storyboard?.instantiateViewController(withIdentifier: "c") as! RejectOrderViewController
cVC.providesPresentationContextTransitionStyle = true
cVC.definesPresentationContext = true
cVC.modalPresentationStyle=UIModalPresentationStyle.overCurrentContext
self.tabBarController?.presentVC(cVC)
所以当我从 C Viewcontroller 解散时,我想显示 Tabbarviewcontroller 或 (A) ViewController
【问题讨论】:
-
你知道 UNwindSegue 吗??
标签: ios iphone swift3 uinavigationcontroller navigation