I'm trying to write a slide out menu that uses a main viewcontroller(VC) and three subviews. I want the subviews to be able to be UINavigationControllers if I want...but I'm having trouble adding them as children of the main VC.
The main view is the delegate of the center view.
What seems to be happening is that the nav bar is being given to the main vc and not retained by the child (if that makes any sense). See Image:
I've recently downloaded another library that yields the desired effect (CHSliderMenu) and it works just fine in iOS6/7, but I'm unable to distinguish the difference between what the author is doing and what I'm doing. I know I'm close, which is what's making this so hard to figure out :(
Here is the code in my MainViewController that attempts to add the child nav controller:
self.view.frame = self.view.bounds;
_centerViewController = [[D2CenterViewController alloc] init];
_centerViewController.view.backgroundColor = [UIColor whiteColor];
_centerViewController.view.tag = CENTER_TAG;
_centerViewController.delegate = self;
UINavigationController *centerNavController = [[UINavigationController alloc] initWithRootViewController:_centerViewController];
[self addChildViewController:centerNavController];
[self.view addSubview:centerNavController.view];
Can you see where I may have gone wrong? Is more code needed to diagnose?