I have navigationController which is presented as modalview and whose rootviewcontroller is say FirstViewController.At some point I want to change rootviewcontroller of navigationController to SecondViewController.What I did is
[self.navigationController initWithRootViewController:SecondViewController];
I am not sure what I did is correct and whether or not FirstViewController got released?Please anyone know what is the correct way of doing this?
Thanks in advance!
Do either
or
where
firstViewControlleris an instance ofFirstViewControllerandsecondViewControlleris an instance ofSecondViewControllerclasses, respectively. The latter variant is a shortcut forsetViewControllers:animated:without animation.