my problem is somewhere in my app I want to redirect my root navigation view but I didn't.
in my scene delegate
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
guard let windowScene = (scene as? UIWindowScene) else { return }
window = UIWindow(frame: windowScene.coordinateSpace.bounds)
window?.windowScene = windowScene
window?.rootViewController = UINavigationController(rootViewController: ViewController())
window?.makeKeyAndVisible()
}
when I want to redirect my rootViewController I used
self.navigationController?.popToRootViewController(animated: true)
but didn't work.
this code redirect me just my ViewController. there is no navigation bar, navigation bar buttons ect.
can anyone help me ?
i have tried everything in this link
there is no solution for me.
i want to add some pictures about my code:
here is my go to root function
i want to see this screen after the go root function
however I see this...