Open lijiee opened 3 years ago
如何在原生端移除当前节点列表中的flutter节点
func goLogin() { let nodeList = DNodeManager.sharedInstance().currentNodeList let currentNode = DNodeManager.sharedInstance().currentNode let vc = THDFlutterViewController.init() let nav = THNavController.init(rootViewController: vc) vc.navigationController?.isNavigationBarHidden = true self.window?.rootViewController = nav } func goHome(){ let nodeList = DNodeManager.sharedInstance().currentNodeList let currentNode = DNodeManager.sharedInstance().currentNode if THUserInfoManager.userType() == .AppTypeAudit{ let nav = THNavController.init(rootViewController: THAuditHomeController.init()) self.window?.rootViewController = nav return } var vc:UITabBarController? if THUserInfoManager.userType() == .AppTypeResident { vc = THBenefitTabBarController.init() }else if THUserInfoManager.userType() == .AppTypeAssess { vc = THAssessTabBarController.init() }else{ vc = THNurseTabBarController.init() } self.window?.rootViewController = vc }
回到首页直接调用popToRoot 这个api就可以啦,之后想切换rootVC的话再调用self.window?.rootViewController = vc
你们是Swift项目吗? 使用dstack有啥问题不,框架没有对Swift做特殊处理。
理论上是可以的,清节点操作未开放
如何在原生端移除当前节点列表中的flutter节点