I'm implementing a kind of cascading menu.
In my storyboard, I've got a UINavigationController
which have a UIViewController
as root view controller (let say it is a MyViewController
). MyViewController
has a storyboard ID : "Menu".
As this controller is a menu, it displays a tableView. When clicking on a cell, it triggers some code, especially :
UINavigationController *menuNavigator = (UINavigationController*)[self.storyboard instantiateViewControllerWithIdentifier:@"Menu"];
MyViewController *newMenu = (MyViewController*)menuNavigator.topViewController;
//Some configurations of newMenu
[self.navigationController pushViewController:newMenu animated:YES];
Since here everything works fine.
In the submenu, the last cell is a "back" cell. When users touch it, it triggers code :
[self.navigationController popViewControllerAnimated:YES];
I return correctly on the previous menu, but without animations.
I've also tried :
[self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:0] animated:YES];
[self.navigationController popToRootViewControllerAnimated:YES];
But I still have no animation.
On the storyboard, my navigation controller is set to not display the navigation bar. If I show it, and touch the "back" button that auto-appears, it's the same result : no animations.
What's wrong with my code?
Edit
I'm using Autolayout and ARC;