The controller that is embedded in the container view (in the storyboard) is automatically added as a child of the Controller Controller in which the container view is added. To understand what I mean, add this line to your viewDidLoad method of the base controller:
NSLog(@"children : %@", self.childViewControllers);
So, let's say in VC1, you add a container view with a built-in VC2 controller (your tableViewController), then the above statement will write VC2 as a child of VC1. To access VC2 from VC1, you simply use [self.childViewControllers objectAtIndex: 0] , and to access VC1 from VC2 just use self.parentViewController.
Hope this helps
source share