当使用 didReceive 方法从视图控制器单击推送通知时,我已设法从应用程序委托打开视图控制器。我的问题是管理层次结构。考虑我有视图 A、B 和 C,这样我将在以下步骤中看到视图 C:视图 A -> 视图 B -> 视图 C。但是当我单击推送通知时,它会将我带到视图 C,所以当我单击时在视图 C 的后退按钮上,视图 B 和视图 A 的堆栈顺序应该相同。有可能这样做吗?
编辑:如果有帮助,这是我的代码
我想要 BaseVc > secondBaseVc > LogbookVc > DetailVc
if let info = userInfo as? [String:Any]{
let id = info["id"] as? String ?? ""
let storyBoard: UIStoryboard = UIStoryboard(name: "Main", bundle:nil)
let BaseVc = storyBoard.instantiateViewController(withIdentifier: "BaseViewController") as! BaseViewController
let secondStoryboard : UIStoryboard = UIStoryboard(name: "Second Storyboard", bundle: nil)
let secondBaseVc : BaseController = secondStoryboard.instantiateViewController(withIdentifier: "secondBaseVc") as! secondBaseVc
let LogbookVc : LogbookVc = secondStoryboard.instantiateViewController(withIdentifier: "LogbookVc") as! LogbookVc
let DetailVc: DetailVc = secondStoryboard.instantiateViewController(withIdentifier: "DetailVc") as! DetailVc
}
我应该如何连接它们以显示 DetailVc 但按顺序排列它们,以便当我单击返回按钮时,我应该有 Logbook < secondBaseVc < Base Vc