title: Calling parent controller's method from a child controller
body: <p>I have a main controller A with a container that includes a child controller B, I need to invoke a method in controller A from my controller B, that's what I did to get my parent controller from B:</p>
  
  <pre><code>MainController = (WatchedViewTableViewController*)self.parentViewController.childViewControllers[1];
  </code></pre>
  
  <p>It worked fine at the beginning, but since my app allows other tabs to access this view controller as well, when it reaches certain hierarchy to this view controller from other tab, it results indexing the wrong <code>MainController</code>.</p>
  
  <p>Since the app allows other tabs to redirect to this view controller as well, <code>self.tabBarController.selectedViewController</code> also doesn't work.</p>
  
  <p>What should be the correct way to achieve it?  Thanks.</p>