Swift popToRoot not working
问题 This highlighted line is where should popToRoot proceed, after a successful registration it should redirect to Root View Controller. For some reason it's not working for me, literally nothing happens, not even error. I tried with self.navigationController?.popToRootViewControllerAnimated(true) 回答1: You don't appear to be using navigation controller at all, so I'd wager that self.navigationController is nil . You could use an unwind segue. So in your root view controller, add a method like so: