How to release all viewcontroller inside a UINavigationController ,without releasing UINavigationController object itself.
My case is ,I am having a navigationcontroller with a set of viewcontrollers pushed in it.At certain situation I want set a new viewcontroller as rootViewController for the available navigationcontroller.So I used
"[navigationcontrollerObj initWithRootViewController:viewController]"; method.
It works fine and my new view hierarchy is set properly.But my issue is, previously pushed viewControllers are not been released.
This is how I pushed my viewcontrollers previously
[navigationcontrollerObj pushViewController:viewControllerObj]; viewControllerObj release];
Any help please.....