title: Adding a background image to UINavigationBar covers the title
body: <p>I have successfully added a background image to my UINavigationBar with the following code: </p>
  
  <pre><code>    UIImageView *barView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"subHeader_lg.png"]];
      [calculatorBar addSubview:barView];
  
      [barView release];
  </code></pre>
  
  <p>However, with this method, the title of the view is covered by the image.</p>
  
  <p><img src="https://i.stack.imgur.com/FE06K.png" alt="enter image description here"></p>
  
  <p>If I navigate further into the app, and then back, the title appears on top of the background image like so:</p>
  
  <p><img src="https://i.stack.imgur.com/6K0MA.png" alt="enter image description here"></p>
  
  <p>Any ideas how I can get the title to appear on top from the beginning?</p>
  
  <p>I have tried pushing the <code>barView</code> to the back, but that makes it hidden behind everything else.</p>
  
  <p>EDIT:</p>
  
  <p>It seems that the custom draw function is the accepted answer, but I am unable to get the draw function to be called. I have this code at the bottom of my appdelegate.m file</p>
  
  <pre><code>@implementation UINavigationBar (UINavigationBarCustomDraw)
  
  - (void)drawRect:(CGRect)rect
  {
      UIImage *image = [UIImage imageNamed: @"subHeader_lg.png"];
      [image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
  }
  
  @end
  </code></pre>