title: topviewcontroller for uitabbar
body: <p>I have created a navigation based project with coredata and replaced the navigationcontroller with a tabbarcontroller.
  But im finding it hard to rewrite this:</p>
  
  <pre><code>UINavigationController *navigationController = (UINavigationController *)self.window.rootViewController;
  MasterViewController *controller = (MasterViewController *)navigationController.topViewController;
  controller.managedObjectContext = self.managedObjectContext;
  </code></pre>
  
  <p>Thanks.</p>