title: Attached iOS 11-style UISearchBar background image
body: <p>I'd like to migrate my <code>tableHeaderView</code> based search bar to the new seamless search bar approach in iOS 11 by configuring <code>navigationItem.searchController</code>.</p>
  
  <p>Since my navigation bar uses a custom background image, I'm wondering how to apply the same background image to the search bar as well. I tried</p>
  
  <pre><code>[navigationBar setBackgroundImage:[UIImage imageNamed:@"NavigationBarPromptBackground"] forBarMetrics:UIBarMetricsDefaultPrompt];
  [searchBar setBackgroundImage:[UIImage imageNamed:@"NavigationBarBackground"] forBarPosition:UIBarPositionAny barMetrics:UIBarMetricsDefault];
  </code></pre>
  
  <p>to no avail. The search bar keeps the standard navigation bar background (with a <code>barTintColor</code> applied) but doesn't show the custom background image.</p>