Transitional style when using setViewControllers: animated: on UINavigationController

I install a new ViewControllers stack in my navigation manager by doing the following:

MainMenuViewController *mainMenuViewController = [[MainMenuViewController alloc] init]; NSArray *controllerArray = [NSArray arrayWithObject:mainMenuViewController]; [mainMenuViewController release]; [self.navController setViewControllers:controllerArray animated:YES]; 

The only problem is that I cannot set the transition style. Ideally, I would like him to roll over. Is it possible? It is very important that I use setViewControllers: animated, not presentModalViewController, as I switch between stacks and want to support navigation control behavior for everyone.

+7
source share
1 answer

Instead of changing all the navigation stacks, why not just support two navigation controllers and animate the transition between them? It seems to me that this is cleaner.

UPDATE

I think I could better help if I knew what you were trying to achieve, but I know that you can present the second navigation controller the first time, and you can put a bunch of views on it before / after the presentation, etc. Also, replacing an existing stack of view controllers, especially if it's deep, can confuse the user, not to mention Apple's expert team.

Maintaining two controllers in memory is not necessarily a big issue if you have memory (maybe you do), and as long as the user really benefits.

Perhaps you can shed light on your high-level goals, and we can go from there.

More details

If you want it to flip over, you can set navController2.modalTranstitionStyle = UIModalTransitionStyleFlipHorizontal , which will translate navController2 when it is presented in format.

SO was having some weird glitch while we commented below, we might have lost your updates.

0
source

All Articles