title: iOS 8 NavigationBar BackgroundImage
body: <p>With iOS 8 the concept of just iPhone and iPad sizes along with portrait and landscape have changed and therefor setting the navigation bars background image isn't working the same. Currently i'm using the following code:</p>
  
  <pre><code>UIImage *NavigationPortraitBackground = [[UIImage imageNamed:@"nav-image-portrait"]
                                           resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
  
  UIImage *NavigationLandscapeBackground = [[UIImage imageNamed:@"nav-image-landscape"]
                                            resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
  
  [[UINavigationBar appearance] setBackgroundImage:NavigationPortraitBackground forBarMetrics:UIBarMetricsDefault];
  [[UINavigationBar appearance] setBackgroundImage:NavigationLandscapeBackground forBarMetrics:UIBarMetricsCompact];
  </code></pre>
  
  <p>The bar metrics portion has been deprecated as of iOS 8. When starting up my app it simply repeats the bar image horizontally when on an iPhone 6 or 6 Plus. I've looked into image slices but i don't think thats the solution either.</p>
  
  <p><img src="https://imgur.com/eAMRcTV" alt="portrait">
  <img src="https://i.imgur.com/IzXftPH" alt="landscape"></p>