[Solved] Swift 4 pop to a view controller : navigation method [closed]


Make sure your controller is in the navigation stack and you can try this code.

for controller in self.navigationController!.viewControllers as Array {
    if controller.isKind(of: SOListScreen .self) {
        self.navigationController!.popToViewController(controller, animated: true)
        break
    }
}

1

solved Swift 4 pop to a view controller : navigation method [closed]