I'm trying to create a container view controller (see screenshot) and I would like to add a navigation controller at the right, but I'm having some problems. Can you help me?
When I add this code in my parent controller (viewDidLoad), I see the view with other position/size, I guess because I can't access navigation controller container view.
Tried:
[self addChildViewController:_detailNavigationController];
_detailNavigationController.view.frame = CGRectMake(256, 49, 768, 651);
[self.view addSubview:_detailNavigationController.view];
And also this, but only works with the first view, evidently.
[self addChildViewController:_detailNavigationController];
_detailNavigationController.topViewController.view.frame = CGRectMake(256, 49, 768, 651);
[self.view addSubview:_detailNavigationController..topViewController.view];
Tried a hack to get navigation controller container view, but doesn't work, I see nothing on the screen and using the debugger I realized view is nil. Apart from that, likely Apple don't like this.
[self addChildViewController:_detailNavigationController];
UIView *view = [_detailNavigationController valueForKey:@"_containerView"];
view.frame = CGRectMake(256, 49, 768, 651);
[self.view addSubview:view];
Am I missing something?
Do you know how I can add a navigation controller inside my own customized container view controller?
Thanks in advance!
Screenshot: http://img803.imageshack.us/img803/2464/screennjz.png