I am trying to change the rootview controller to a different screen after the user has logged out.
if let window = UIApplication.shared.windows.first {
window.rootViewController = UIHostingController(rootView: SignInView())
window.endEditing(true)
window.makeKeyAndVisible()
}
This is what I have so far. It navigates to the different view but it makes the buttons on the new new view unusable. Is there a better way to change the rootview or am I missing something?