title: How can I change images for UIBarButtonItems of UINavigationController in QLPreviewController
body: <p>I'm using QLPreviewController for showing a pdf. I want to change the background images for UINavigationBar and UIBarButtonItems of QLPreviewController.</p>
  
  <p>I'm using this code:</p>
  
  <pre><code>for (id object in controller.childViewControllers)
  {
      if ([object isKindOfClass:[UINavigationController class]])
      {
          UINavigationController *navController = object;
  
          [navController.navigationBar setBackgroundImage:[UIImage imageNamed:@"navbar_1x.png"] forBarMetrics:UIBarMetricsDefault];
          NSLog(@"items count ====%d",[[navController.navigationBar items] count]);
  
          if ([[navController.navigationBar items] count] &gt; 0)
          {
              UINavigationItem *navItem = [[navController.navigationBar items] objectAtIndex:0];
              navItem.rightBarButtonItem.image = [UIImage imageNamed:@"pdf30.png"];
  
          }
      }
  }
  </code></pre>
  
  <p>By using above code I changed background image of navigationbar. But I can't changing background images for barbuttonitems.</p>
  
  <p>Please help me. Thanks in advance.....</p>