Im trying to call popToRootViewController
function from a view controller that is connected to a navigationController
. When i removed that navigationController
im able to go to my RootViewController
. But if there is a navigation controller connected to (My case: TableViewController ) ViewController
. the popToRootViewController
will end up with the navigationController
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if indexPath.section == 2 && indexPath.row == 0 {
Utilities.shared.clearTokens()
navigationController?.popToRootViewController(animated: false)
}
}