title: NavigationBar not displaying properling when pushViewController
body: <p>The problem is pretty simple to understand with pictures. 
  I have a UINavigationController that allow the user to switch between to views.</p>
  
  <p>The first view contains a search bar and a table view like so :<img src="https://i.stack.imgur.com/YY6YK.png" alt="enter image description here"></p>
  
  <p>The second is a basic view where information about the cell are display</p>
  
  <p>When I click on the search bar, the navigation controller gets hidden and the search bar is now at the top.</p>
  
  <p>Now, if I click on a cell, it goes to the second views, but the navigation bar is first hidden like below :</p>
  
  <p><img src="https://i.stack.imgur.com/0z5D4.png" alt="enter image description here"></p>
  
  <p>And then, it automatically appears like that :</p>
  
  <p><img src="https://i.stack.imgur.com/Zsfqi.png" alt="enter image description here"></p>
  
  <p>I have tried a couple of things like show the navigation bar before pushing the next view controller but it is quite ugly..
  Does anyone know how to have the show the navigation bar directly on the second view (like in the contact application)?</p>
  
  <p><strong>[UPDATE] : Code</strong></p>
  
  <p><strong>AppDelegate.m</strong> (I'm talking about navigationcontroller2)</p>
  
  <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  {    
      self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
      FirstViewController *viewController1 = [[FirstViewController alloc] initWithNibName:@"FirstViewController" bundle:nil];
      SecondViewController *viewController2 = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil];
  
      viewController1.managedObjectContext = [self managedObjectContext];
      viewController2.managedObjectContext = [self managedObjectContext];
      viewController1.viewController2 = viewController2;
  
      UINavigationController *navigationcontroller1 = [[UINavigationController alloc] initWithRootViewController:viewController1];
      [navigationcontroller1.navigationBar setTintColor:[UIColor lightGrayColor]];
      UINavigationController *navigationcontroller2 = [[UINavigationController alloc] initWithRootViewController:viewController2];
      [navigationcontroller2.navigationBar setTintColor:[UIColor lightGrayColor]];
  
      self.tabBarController = [[UITabBarController alloc] init];
      self.tabBarController.viewControllers = [NSArray arrayWithObjects:navigationcontroller1, navigationcontroller2, nil];
  
      self.window.rootViewController = self.tabBarController;
      [self.window makeKeyAndVisible];
  
      return YES;
  }
  </code></pre>
  
  <p><strong>FirstView.m</strong></p>
  
  <pre><code>- (void) searchBarTextDidBeginEditing:(UISearchBar *)theSearchBar {
      [self.navigationController setNavigationBarHidden:YES animated:YES];
  }
  
  - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
  {
      if (!noResultsToDisplay) {
          PinDetailsViewController *pinDetailsViewController = [[PinDetailsViewController alloc] initWithNibName:@"PinDetailsViewController" bundle:nil];
          NSManagedObject *managedObject = [fetchedResultsController objectAtIndexPath:indexPath];
          Pin *pin = (Pin *) managedObject;
  
          [self.navigationItem setTitle:@"Pins"];
          [self.navigationController pushViewController:pinDetailsViewController animated:YES];
          [pinDetailsViewController updateWithPin:pin];
      }
  }
  </code></pre>
  
  <p>If you need anything else, just ask but I think it's all there.</p>