title: Setting UIToolBar background image
body: <p>I have an image that I would like to use as the background for a UIToolBar in an iOS 5+ app.  The background image changes according to actions taken on the view.  The image is larger than the UIToolBar, so the image needs to be resized as a reduction rather than increasing the size.</p>
  
  <p>After review of the other questions on here, as well as other research into the issue, the resolution recommended does not work.  The recommendation is as follows:</p>
  
  <pre><code>UIImage *topimg = [[UIImage imageNamed:@"headerBar-Human.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
  [_headerBar setBackgroundImage:topimg forToolbarPosition:UIToolbarPositionTop barMetrics:UIBarMetricsDefault];
  </code></pre>
  
  <p>I have tried with different values in the UIEdgeInsetsMake call with no luck.  The problem is that the image is not shown at all.  The default blue toolbar background is shown.</p>
  
  <p>If I remove the resizableImageWithCapInsets function the image will show, but only the portion of the image covered by the toolbar rect coordinates.</p>
  
  <p>I have also tried creating a UIImageView, adding the image and adding it to the toolbar, but the results are the same.</p>
  
  <p>Does anyone have any suggestions?</p>