In Home ViewController based on user selection I will have to load selected viewcontroller. For this I am changing AppDelegate.window.rootViewController to the navigationcontroller inited with selected view controller.
Ex:
navigationController = [[UINavigationController alloc] initWithViewController:selectedViewController];
[UIApplication delegate].window.rootviewcontroller = navigationController;
This is all working fine but my question here is: from selectedViewController I am navigating to some n no.of viewcontrollers and at last I am loading HomeViewController by setting the appdelegate' rootviewcontroller.
navigationController = [[UINavigationController alloc] initWithViewController:homeViewController];
[UIApplication delegate].window.rootviewcontroller = navigationController;
Will this clear my previous navigationController navigation stack? or should I externally clear the array? Possibly explain me what happens when we assign navigation controller to appdelegate' window rootviewcontroller?
Please note that my application is 6.0 version.