title: NavigationItem setTitle doesn't work for second level UIViewController
body: <p>in my app i have an UITabBarController with UINavigationControllers initialized like this </p>
  
  <pre><code>UINavigationController *newsNavigationController = [[UINavigationController alloc] initWithRootViewController: newsViewControler];
  </code></pre>
  
  <p>newsViewController is an UIViewController.
  When i press the button in the tabbar to show the navigation item with the newsViewController the title in the navigation bar is set ok. in the newsViewController i have a method setup that i call after init. In the setup method i set the title like this
  <code>[[self navigationItem] setTitle:[category_c title]];</code></p>
  
  <p>The problem comes now, in my newsViewController i have a tableView, when i touch a cell i want to push a UIViewController with the selected news and in the navigation bar to show the title.</p>
  
  <p>In the UIViewController i have the same setup method in which i setup the title like above. The problem is that is not shown. The navigation item is not null because i can call <code>self.navigationItem.hidesBackButton = YES;</code> and it hides the backbutton every time but the title isn't shown.</p>
  
  <p>I create and push the news UIViewController like this when a cell is touched</p>
  
  <pre><code>if(newsViewController == nil){
          newsViewController = [[NewsViewController alloc] init];
          [newsViewController setup];
      }
      [self.navigationController pushViewController: newsViewController animated:YES];
  </code></pre>
  
  <p>The setup method in the newsViewController looks like this:</p>
  
  <pre><code>- (void) setup {
      self.navigationItem.hidesBackButton = YES;
      [self.navigationItem setTitle:@"my view"];
  }
  </code></pre>
  
  <p>in the newsViewController i have viewDidLoad and tried to set the title there but with no success.</p>
  
  <ul>
  <li>(void)viewDidLoad {
  self.navigationItem.title = @"Test";
  [super viewDidLoad];
  }</li>
  </ul>
  
  <p>if after <code>[self.navigationController pushViewController: newsViewController animated:YES];</code>
  i write <code>[[self.navigationController.viewControllers objectAtIndex:0] setTitle:@"myTitle"];</code> the UIViewController that contains the UITableView gets the title myTitle instead of the newsViewController that i pushed when i touched the cell.</p>
  
  <p>any pointers? i can't understand why the title is not set correctly.</p>
  
  <p><strong>EDIT2: After reading a little more and going through my code with the debugger step by step and comparing the rootviewcontrollers with the childViewControllers i've observed that in the viewDidLoad method of the childViewController after setting self.title = @"title" the navigationItem is created so it's not the nil situation. In the debugger when i expand the _navigationItem variable the field _navigationBar is nil after leaving viewDidLoad, in the rootViewControllers the navigationBar is NOT NULL and the title is there. I read that if the navigationBar is null the title will not show up. In the image is what i've seen in the debuger. <a href="http://img138.imageshack.us/img138/1513/picture2bq.png" rel="noreferrer">alt text http://img138.imageshack.us/img138/1513/picture2bq.png</a> now i'm searching in this direction.</strong></p>
  
  <p><strong>EDIT1: below is the code for the parentViewController, firstChildViewController and second ChildViewController.
  the parentViewController is viewed(the title is OK). I press a button on the navigationBar that calls bearbeitenAction -> the first child is pushed(title is not showed). On the navigation bar of the firstChildViewController i have a button that when is pressed pushes a new ViewController on the stack(secondChildViewController). The title of the second ChildViewController is not ok. When i press Back the title of the firstChildViewController is showed Ok.</strong> </p>
  
  <p>parentViewController:</p>
  
  <pre><code>    //MARK: -
      //MARK: Initialization methods
      - (void) setup {
          dataManipulator = [[DataManipulation alloc] init];
          dataManipulator.delegate = self;
  
          [self.tabBarItem initWithTitle:[NSString stringWithFormat:@"%@",[category_c title]] image:[UIImage newImageFromResource:[category_c icon]] tag:0];
  
          searchResults = nil;
          companyDetailsPushed = NO;
      }
  
      //MARK: -
      //MARK: ViewControllerMethods
      // Implement loadView to create a view hierarchy programmatically, without using a nib.
      - (void) loadView {
          NSLog(@"WatchlistViewController: loadView");
  
          UIView *mainView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, [[UIScreen mainScreen] applicationFrame].size.width, [[UIScreen mainScreen] applicationFrame].size.height)] autorelease];
          [mainView setBackgroundColor:[UIColor whiteColor]];
          mainView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
          mainView.contentMode = UIViewContentModeScaleToFill;
          [mainView setAutoresizesSubviews:YES];
  
              companiesTable = [[UITableView alloc] initWithFrame:CGRectMake(0, 44, [[UIScreen mainScreen] applicationFrame].size.width, 322)];
          companiesTable.delegate = self;
          companiesTable.dataSource = self;
          [mainView addSubview:companiesTable];
          [companiesTable release];
  
              self.view = mainView;
      }
  
      - (void)viewDidLoad {
          [super viewDidLoad];
          if(![[category_c subtitle] isEqualToString:@""]) {
              self.title = [category_c subtitle];
          }
          else {
              self.title = [category_c title];
          }
      }
  
      - (void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
  
          if(companyDetailsViewController == nil) {
              companyDetailsViewController = [[CompanyDetailsScrollViewController alloc] init];
              [companyDetailsViewController setup];
          }
  
          [watchlistDoneBtn setHidden:TRUE];
          companyDetailsPushed = YES;
  
          if(viewMode == SearchViewMode)
              [companyDetailsViewController setCompany:[searchResults objectAtIndex:indexPath.row]];
          else if(viewMode == WatchlistViewMode)
              [companyDetailsViewController setCompany:[[[Financial_deAppDelegate sharedAppDelegate] watchlistCompanies] objectAtIndex:indexPath.row]];
  
          [[self navigationController] pushViewController:companyDetailsViewController animated:YES];
      }
  
  - (void) bearbeitenAction:(UIButton *) sender {
      NSLog(@"Berbeiten btn was pressed");
      if(berbeitenViewController == nil){
          berbeitenViewController = [[BerbeitenViewController alloc] init];
          [berbeitenViewController setup];
      }
      [self.navigationController pushViewController:berbeitenViewController animated:YES];
  }
  </code></pre>
  
  <p>firstChildViewController  = berbeitenViewController in the code:</p>
  
  <pre><code>- (void) setup {
      self.navigationItem.hidesBackButton = YES;
  }
  
  // Implement loadView to create a view hierarchy programmatically, without using a nib.
  - (void)loadView {
      NSLog(@"BerbeitenViewController: loadView");
  
      UIView *mainView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, [[UIScreen mainScreen] applicationFrame].size.width, [[UIScreen mainScreen] applicationFrame].size.height)] autorelease];
      [mainView setBackgroundColor:[UIColor darkGrayColor]];
      mainView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
      mainView.contentMode = UIViewContentModeScaleToFill;
      [mainView setAutoresizesSubviews:YES];
  
      berbeitenBackBtn = [[UIButton alloc] initWithFrame:CGRectMake(5, 23, 69, 36)];
      [berbeitenBackBtn setBackgroundImage:[UIImage newImageFromResource:@"back_btn.png"] forState:UIControlStateNormal];
      [berbeitenBackBtn addTarget:self action:@selector(popViewController:) forControlEvents:UIControlEventTouchUpInside];
      [berbeitenBackBtn setEnabled:TRUE];
      [self.navigationController.view addSubview:berbeitenBackBtn];
      [berbeitenBackBtn release];
  
      berbeitenAddBtn = [[UIButton alloc] initWithFrame:CGRectMake(260, 23, 55, 36)];
      [berbeitenAddBtn setBackgroundImage:[UIImage newImageFromResource:@"bearbeiten_add_btn.png"] forState:UIControlStateNormal];
      [berbeitenAddBtn addTarget:self action:@selector(addCompany:) forControlEvents:UIControlEventTouchUpInside];
      [berbeitenAddBtn setEnabled:TRUE];
      [self.navigationController.view addSubview:berbeitenAddBtn];
      [berbeitenAddBtn release];
  
      companiesTable = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, [[UIScreen mainScreen] applicationFrame].size.width, 366)];
      companiesTable.delegate = self;
      companiesTable.dataSource = self;
      [mainView addSubview:companiesTable];
      [companiesTable release];
  
      self.view = mainView;
  }
  
  - (void)viewDidLoad {
      NSLog(@"BerbeitenViewController viewDidLoad");
      [super viewDidLoad];
      self.title = @"Edit watchlist";
  }
  
  //MARK: Buttons actions
  
  - (void) popViewController:(UIButton *) sender {
      NSLog(@"Pop BerbeitenViewController");
      [self.navigationController popViewControllerAnimated:YES];
  }
  
  - (void) addCompany:(UIButton *) sender {
      NSLog(@"Berbeiten addCompany btn pushed");
      if(searchViewController == nil){
          searchViewController = [[SearchViewController alloc] init];
          [searchViewController setup];
      }
      [self.navigationController pushViewController:searchViewController animated:YES];
  }
  </code></pre>
  
  <p>secondChildViewController = searchViewController in code</p>
  
  <pre><code>- (void) setup {
      self.navigationItem.hidesBackButton = YES;
  }
  
  // Implement loadView to create a view hierarchy programmatically, without using a nib.
  - (void)loadView {
      NSLog(@"BerbeitenViewController: loadView");
  
      UIView *mainView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, [[UIScreen mainScreen] applicationFrame].size.width, [[UIScreen mainScreen] applicationFrame].size.height)] autorelease];
      [mainView setBackgroundColor:[UIColor darkGrayColor]];
      mainView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
      mainView.contentMode = UIViewContentModeScaleToFill;
      [mainView setAutoresizesSubviews:YES];
  
      searchViewBackBtn = [[UIButton alloc] initWithFrame:CGRectMake(5, 23, 69, 36)];
      [searchViewBackBtn setBackgroundImage:[UIImage newImageFromResource:@"back_btn.png"] forState:UIControlStateNormal];
      [searchViewBackBtn addTarget:self action:@selector(popViewController:) forControlEvents:UIControlEventTouchUpInside];
      [searchViewBackBtn setEnabled:TRUE];
      [self.navigationController.view addSubview:searchViewBackBtn];
      [searchViewBackBtn release];
  
      self.view = mainView;
  }
  
  
  // Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
  - (void)viewDidLoad {
      [super viewDidLoad];
      self.title = @"Edit Watchlist";
  }
  </code></pre>