I am making an iPad app which has many view controllers with a non-linear flow. I used navigation controller at first but after some time it became difficult to manage the stack (to push and pop view). If i just go with pushing the view at every navigation, eventually the stack will become too heavy to be managed and is undesirable.
So i came across a way to replace the rootviewcontroller every time i want to make a navigation
Here's the code for it
twoViewController *twoVC = [[twoViewController alloc] init] ;
[self.navigationController setViewControllers: [NSArray arrayWithObject: twoVC] animated: YES];
I am writing this code in Firstviewcontroller. twoViewController is the viewcontroller i want to replace with the rootviewcontroller.
Problem: it is navigation but now the twoViewController is coming totally black.
Please help...
Note- i am using using storyboard