Go back to the root view controller – Swift

navigationController?.popToRootViewControllerAnimated(true)