I want to implement my own container view controller. Pls, imagine that this is my ipad
Kind of usual split view controller, but I want to extend it: width of view "a" should be resizable, when I tap view 'B' - view 'C' goes to visible area
For instance in my storyboard, I have 3 container views: AViewController (for A view), BViewController,CViewController and one combined view controller (initial view controller). In combined view controller i will implement embed segues from container view and initialize relationship between container views via following code:
@property ... *aViewController,*bViewController,*cViewController;
- (void)prepareForSegue:(UIStoryboardSegue *)segue
sender:(id)sender
{
if ([segue.identifier isEqualToString:@"EmbedAViewController"])
{
self.aViewController =
segue.destinationViewController;
}
if ([segue.identifier isEqualToString:@"EmbedBViewController"])
{
self.bViewController=segue.destinationViewController
}
-(void)viewDidLoad
{
[super viewDidLoad];
self.aViewController.bViewController=self.bViewController;
}
Question1: Is it proper way implement my assignment using storyboards? Question2: What kind of limitations does container view have? Is it a visual replacement of addChildViewController API? If no, where should I implement child-parent relationship? I should use in my combined view controller in prepareForSegue method
[self addChildViewController:aViewController];
[self.view addSubview:aViewController.view];
Question3: How to put container view outside of visible area at the beginning?
If I somewhere did a mistake or have a big misunderstanding of basic concepts, do not beat me. I did a lot of google-foo, I would really appreciate any help. Great thanks in advance!
Edit:
I want to set up relationship between all of them. "B" view's content depends on "A", and "C" view's content depends on "B".