SwiftUIX / Coordinator

A declarative navigation API for SwiftUI.
MIT License
252 stars 21 forks source link

Could not resolve a root view controller. #9

Open trunghvbk opened 3 months ago

trunghvbk commented 3 months ago

Sometimes when I run the app, this runtime-warning happens, and I don't know why. I searched on the issue list and it seems no one has the same issue. Please help to check this. Thanks. image The code of the Router is something like this

enum MainScreen {
    case pop
    case accountView
}

class MainRouter: UIViewControllerCoordinator<MainScreen> {
    override func transition(for route: MainScreen) -> ViewTransition {
        switch route {
        case .pop:
            return .dismiss
        case .accountView:
            return .push(AccountViewFactory(checkedUser: true))
        }
    }
}