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

[ad_1]

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

[ad_2]

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