title: Segue does not trigger in tab bar app
body: <p>I'm using storyboard and XCode 4.3 to create an app that has a tab bar as root view. Even though my app has other segues that work just fine, one of them just does not trigger. It's supposed to trigger when the third item of the tab is selected. The only thing I can see is that the tab bar actually loads the new view, but no information is passed.</p>
  
  <p>The connections on Storyboard are as follow : Root View controller (Tab bar) -> Navigation Controller -> CapitolDetailViewController (which has a push segue from another view controller) </p>
  
  <p>I've tried many changes in the connections, code, etc. But it just doesn't trigger this segue. I tried to change the code in my AppDelegate to add the new controllers that were missing. The code for my applicationDidFinishLaunching is the following: </p>
  
  <pre><code>NSManagedObjectContext *context = [self managedObjectContext];
  
  
  NSError *error;
  if (![context save:&amp;error]) {
      NSLog(@"Whoops, couldn't save: %@", [error localizedDescription]);
  }
  
      tabBarController = (UITabBarController *)self.window.rootViewController;
  
  
      UINavigationController *view1 = [[tabBarController viewControllers]    objectAtIndex:0];
      UINavigationController *view2 = [[tabBarController viewControllers] objectAtIndex:1];
      UINavigationController *view3 = [[tabBarController viewControllers] objectAtIndex:2];
  
      SCDMasterViewController *view11 = [[view1 viewControllers] objectAtIndex:0];
      view11.managedObjectContext = self.managedObjectContext;    
  
      SerieDetailViewController *view22 = [[view2 viewControllers] objectAtIndex:0];
  
      CapitolDetailViewController *view33 = [[view3 viewControllers] objectAtIndex:0];
  
  
      return YES;
  </code></pre>
  
  <p><strong>Where "SerieDetailViewController" is the one that should pass the information when the 3rd item is selected, and "CapitolDetailViewController" is the one that should receive it.</strong></p>
  
  <p>Code for my segue: (it doesn't even enter the segue, de NSLOG never shows up)</p>
  
  <pre><code>    - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  
  
      NSLog(@"Entra segue");
  
  
      if ([segue.identifier isEqualToString:@"mostraCapitol"]) {
  
  
  
          NSString *nom = @"";
  
          nom= serieName;
  
          CapitolDetailViewController *destViewController = segue.destinationViewController;
  
          destViewController.serieName2 = nom; 
  
      }
  }
  </code></pre>
  
  <p>Anyone knows what is wrong? </p>
  
  <p><strong>UPDATE</strong>: even though I received an answer that helped me to correct some compilation errors, the problem is still there. If I click the tab bar item, it loads an empty view. It never calls the segue. It looks like the tab bar items and the view controllers are not attached.</p>