Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

移除混合栈中节点 #17

Open
lijiee opened this issue Nov 5, 2021 · 3 comments
Open

移除混合栈中节点 #17

lijiee opened this issue Nov 5, 2021 · 3 comments

Comments

@lijiee
Copy link

lijiee commented Nov 5, 2021

如何在原生端移除当前节点列表中的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
}
@whqfor
Copy link
Collaborator

whqfor commented Nov 9, 2021

回到首页直接调用popToRoot 这个api就可以啦,之后想切换rootVC的话再调用self.window?.rootViewController = vc

@whqfor
Copy link
Collaborator

whqfor commented Nov 9, 2021

你们是Swift项目吗? 使用dstack有啥问题不,框架没有对Swift做特殊处理。

@whqfor
Copy link
Collaborator

whqfor commented Nov 24, 2021

理论上是可以的,清节点操作未开放

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants