title: Customized navigation bar hides buttons
body: <p>Hope you can help with this one too...
  I wanted to customize my navigation bar by adding custom background picture. I found out perfect but a bit complicated method called:NavigationSwizzle. In previous project I worked without any serious problems, but now I'm stuck...</p>
  
  <p>From my AppDelegate I am calling this static method:</p>
  
  <pre><code>@implementation SCAppUtils
  + (void)customizeNavigationController:(UINavigationController *)navController
  {
  //Customizing navigation BAR
  UINavigationBar *navBar = [navController navigationBar];
  [navBar setTintColor:kSCNavBarColor];
  
  //Customizing TOOLBAR
  [navController setToolbarHidden:NO animated:YES];
  
  UIToolbar *toolBar = [navController toolbar];
  
  UIImageView *imageView = (UIImageView *)[navBar viewWithTag:kSCNavBarImageTag];
  UIImageView *imageView2 = (UIImageView *)[toolBar viewWithTag:kSCNavBarImageTag];
  
  if (imageView == nil)
  {
      Utilities *utilities = [[Utilities alloc]init];
  
      UIImage *img = [UIImage imageNamed:@"nav-bar-background.png"];
      UIImage *img2 = [UIImage imageNamed:@"toolbar-background.png"];
  
      imageView = [[UIImageView alloc] initWithImage:img];
      imageView2 = [[UIImageView alloc] initWithImage:img2];  
  
      [imageView setTag:kSCNavBarImageTag];
      [imageView2 setTag:kSCNavBarImageTag];
  
      [navBar insertSubview:imageView atIndex:0];
      [toolBar insertSubview:imageView2 atIndex:0];   
  
      [imageView release];
      [imageView2 release];
      [utilities release];
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>In rootNavigationController after calling second view controller by pushing it on the stack my right button, self.title, activityIndicator don't show. If I comment or set <em>atIndex:-1</em> in line <em>[navBar insertSubview:imageView atIndex:0];</em> then buttons show, but my customized background is gone and I get regular iPhone navigational tab.</p>
  
  <p>In <em>didSelectRowAtIndex</em> of <em>rootNavigationController</em> I have:</p>
  
  <pre><code>//ADD BACK BUTTON TO VIEW
  UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"Home" style:UIBarButtonItemStyleDone target:nil action:nil];
  self.navigationItem.backBarButtonItem = backButton; 
  
  //Home Button color
  self.navigationController.navigationBar.tintColor = [UIColor colorWithRed:166.0 / 255 green:179.0 / 255 blue:191.0 / 255 alpha:1.0];
  
  //PUSH TO NEXT VIEW
  [self.navigationController pushViewController:detailViewController animated:YES];
  </code></pre>
  
  <p>Thank you in advance...</p>
  
  <p>If you need more code or explanation, please don't hesitate to ask me...</p>
  
  <p>Best regards,
  Luka</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Ok, I can make this question much simpler. I have a custom background image in my navigation bar. This image is obviously covering my </p>
  
  <pre><code>self.navigationItem.title = @"TITLE";
  </code></pre>
  
  <p>If I put alpha to: 0.3 of imageView that is in the background I can see my title:</p>
  
  <pre><code>imageView = [[UIImageView alloc] initWithImage:image];
  [imageView setAlpha:0.3];
  [imageView setTag:kSCNavBarImageTag];
  [navBar insertSubview:imageView atIndex:0];
  </code></pre>
  
  <p>So the question is how can I send my navigationItem.title to front? Is it a UIView class descendent?</p>
  
  <p><strong>EDIT 2:</strong>
  Really weird thing is that title is visible (above background image) in the rootController but after pushing another viewController title goes behind te background imageView ?!</p>