title: UINavigationController transition issue
body: <p>This is a Apple simple guide about <strong>Table Search with UISearchController</strong>, and I have downloaded the demo project and it is working well.</p>
  
  <p><a href="https://developer.apple.com/library/content/samplecode/TableSearch_UISearchController/Introduction/Intro.html" rel="nofollow noreferrer">https://developer.apple.com/library/content/samplecode/TableSearch_UISearchController/Introduction/Intro.html</a> </p>
  
  <p>I want to have transparent navigation bar on product detail view (<strong>DetailViewController.swift</strong>). After changing some behaviors I have transition issue when going back from product detail to device list with swipe gesture(Video link below). </p>
  
  <p><a href="https://www.dropbox.com/s/denqomhhxasxv58/issue.mov?dl=0" rel="nofollow noreferrer">https://www.dropbox.com/s/denqomhhxasxv58/issue.mov?dl=0</a></p>
  
  <p>For transparent navigation bar I have added this lines on <strong>DetailViewController</strong> 
  <strong>viewWillAppear</strong> method</p>
  
  <pre><code>override func viewWillAppear(_ animated: Bool) {
      super.viewWillAppear(animated)
  
      // ...
  
      navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
  }
  </code></pre>
  
  <p>In <strong>MainTableViewController.swift</strong> I have added this code to make navigationBar default style.</p>
  
  <pre><code>override func viewWillAppear(_ animated: Bool) {
      super.viewWillAppear(animated)
  
      navigationController?.navigationBar.setBackgroundImage(nil, for: .default)
      navigationController?.navigationBar.shadowImage = UIImage()
  }
  </code></pre>
  
  <hr>
  
  <p>Also I made changes on MainTableViewController <strong>viewDidLoad</strong> method and sets this properties to true.</p>
  
  <pre><code>navigationItem.hidesSearchBarWhenScrolling = true
  searchController.dimsBackgroundDuringPresentation = true
  </code></pre>
  
  <p>So my problem is to fix that issue. Anyone can help me?</p>
  
  <p>Update: </p>
  
  <p>Swipe transition from product detail to device list
  <a href="https://i.stack.imgur.com/Ln98Y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ln98Y.png" alt="Swipe transition from product detail to device list"></a>
  Search controller active state when product detail not opened
  <a href="https://i.stack.imgur.com/bqneX.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bqneX.jpg" alt="Search controller active state when product detail not opened"></a>
  Search controller active state after product detail opened
  <a href="https://i.stack.imgur.com/kqoZd.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kqoZd.jpg" alt="Search controller active state after product detail opened"></a></p>