title: Back button not appearing on UINavigationController - can't debug
body: <p>The back button on a navigation controller is sometimes not appearing. Note that sometimes it does, so there is probably something else going on in som code elsewhere, but I have tried to debug this in every way I can think, and nothing seems to work.</p>
  
  <p>The code for pushing the view controller is as follows (pretty standard):</p>
  
  <pre><code>CommentsTableViewController *vc = [[[CommentsTableViewController alloc] init] autorelease];
  vc.puzzleID = self.puzzleModel.puzzleID;
  [self.navigationController pushViewController:vc animated:YES];
  </code></pre>
  
  <p>To debug this problem, I have put the following code in the CommentsTableViewController in viewWillAppear and viewDidAppear (except I only register as an observer once):</p>
  
  <pre><code>self.navigationItem.hidesBackButton = NO;
  
  [self.navigationItem addObserver:self forKeyPath:@"backBarButtonItem" options:(NSKeyValueObservingOptionNew | NSKeyValueObservingOptionInitial) context:nil];
  
  self.navigationItem.backBarButtonItem.title = @"Tactic";
  NSArray *viewControllerArray = [self.navigationController viewControllers];
  int parentViewControllerIndex = [viewControllerArray count] - 2;
  [[viewControllerArray objectAtIndex:parentViewControllerIndex] setTitle:@"Tactic"];
  </code></pre>
  
  <p>None of this seems to help. Putting breakpoints in, it seems like the view controller above me in the hierarchy has a title (@"Tactic") and hidesBackButton is already NO. The backBarButtonItem property is nil and is always nil, though I think this is expected behavior even when you do have a backBarButtonItem?</p>
  
  <p>EDIT: In the parent controller, I am setting hidesBackBackButton to YES at first, and then later (before I push on the next controller), setting it back to NO. When I remove these lines, the new view controller has a back button. Why would the navigation item of one view controller affect the navigation item of the next?</p>
  
  <p>Any suggestions or ideas are welcome. Thanks a lot. </p>