Question : swift go to root view controller
Answered by : mobile-star
// For Navigation
self.navigationController?.popToRootViewController(animated: true)
// For Presenting modally
self.view.window!.rootViewController?.dismissViewControllerAnimated(false, completion: nil)
Source : | Last Update : Wed, 11 Mar 20