title: Custom back button in UINavigationController
body: <p>For an application I'm developing, I need to display a custom back button in a navigation bar. I have the button asset as a PNG image, and I'm writing this code:</p>
  
  <pre><code>- (void)viewWillAppear:(BOOL)animated {
      [super viewWillAppear:animated];
      UIButton *backButton = [UIButton buttonWithType:UIButtonTypeCustom];
      backButton.frame = CGRectMake(0, 0, 79, 29.0);
      [backButton setImage:[UIImage imageNamed:@"button_back.png"] forState:UIControlStateNormal];
      self.navigationItem.backBarButtonItem = [[[UIBarButtonItem alloc] initWithCustomView:backButton] autorelease];
  </code></pre>
  
  <p>}</p>
  
  <p>When I push this view controller, the custom button does not show up, and instead I get the standard back button with the title of this view controller inside.</p>
  
  <p>Things I already tried:</p>
  
  <ol>
  <li>Doubled check that the button <code>backButton</code> is created properly, by adding it to the view hierarchy. It displays properly.</li>
  <li>In the same method, changed the <code>title</code> property of the <code>navigationItem</code> and confirmed that it changes (as expected) the content of my back button.</li>
  </ol>
  
  <p>Can anyone spot what I'm doing wrong? Did anyone succeed in using a custom image as the back button on with a <code>UINavigationController</code>?</p>