I am working on an application in which I have to display several view controllers side by side (split views). To do this, I added the view as the controller of the child view.
PURPOSE: I want to show the navigation bar on one controller of the child view together with the already specified separate navigation panel on the controller of the parent view.
PROBLEM: The navigation bar does not appear on the child view controller.
EDIT: I also set the navigation bar of the parent view controller as hidden, but when the child view controller is called, the navigation bar appears on the parent view controller, not the child view controller.
Code to add a child view controller:
MyChildViewController *childViewController = [[MyChildViewController alloc] initWithNibName:@"MyChildViewController" bundle:nil];
[self addChildViewController:childViewController];
[childViewController.view setFrame:CGRectMake(0.0f, 0.0f, self.rightContainerView.frame.size.width, self.rightContainerView.frame.size.height)];
[self.rightContainerView addSubview:childViewController.view];
[childViewController didMoveToParentViewController:self];
This code works fine, and the child view controller adds fine. I want to know if this is possible or not?
Thanks in advance.
source
share