title: UIBarButtonItem appearance difference between iOS 5 and iOS 6
body: <p>I'm using the appearance proxy to set the background image of the back button in the navigation bar.</p>
  
  <pre><code>[[UIBarButtonItem appearance] setBackButtonBackgroundImage:[[UIImage imageNamed:@"arrow-back-button"] resizableImageWithCapInsets:UIEdgeInsetsMake(0., 9., 0., 0.)]
                                                    forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
  </code></pre>
  
  <p>This works great for iOS 6, looks absolutely perfect. In iOS 5, however, the background image starts repeating, almost as if the button is taller or something.</p>
  
  <p>iOS 5:</p>
  
  <p><img src="https://i.stack.imgur.com/ZXGIk.png" alt="iOS 5 version"></p>
  
  <p>iOS 6:</p>
  
  <p><img src="https://i.stack.imgur.com/s3dVB.png" alt="iOS 6 version"></p>
  
  <p>The image used (with a coloured background to highlight the size).</p>
  
  <p><img src="https://i.stack.imgur.com/0Jhgi.png" alt="Back button image"></p>
  
  <p>Can anyone help me make the back button look correct in iOS 5?</p>
  
  <p>EDIT:</p>
  
  <p>Here is the result if I don't use <code>resizableImageWithCapInsets:</code>.</p>
  
  <p><img src="https://i.stack.imgur.com/2BFT7.png" alt="iOS 5 with no resizableImage"></p>