title: How to set a transparent navigation bar? iOS 11 swift 4 Xcode 9
body: <p>On the picture on the right is what I need and on the left is what I get:</p>
  
  <p><a href="https://i.stack.imgur.com/SceOh.jpg" rel="noreferrer">1</a></p>
  
  <p>I'm trying to make a transparent navigation bar, and in the book which I'm reading it's written that all you need to do is to insert this code in viewDidLoad() method of the preferable View Controller:</p>
  
  <pre><code>navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
  navigationController?.navigationBar.shadowImage = UIImage()
  navigationController?.navigationBar.tintColor = .white
  
  tableView.contentInsetAdjustmentBehavior = .never
  </code></pre>
  
  <p>But all I get is a white navigation bar. 
  Also if's written that the difference of bars on the picture is in this code:</p>
  
  <pre><code>tableView.contentInsetAdjustmentBehavior = .never
  </code></pre>
  
  <p>But it doesn't work for me</p>
  
  <p>I downloaded the final project of this book's chapter and everything works fine there, though I've tried to copy-paste the code and still got nothing changed</p>
  
  <p>And the thing is - I've already tried to insert this code:</p>
  
  <pre><code>navigationController?.navigationBar.isTranslucent = true
  </code></pre>
  
  <blockquote>
    <p>But it doesn't work</p>
  </blockquote>
  
  <p>If it matters, the book is "Beginning iOS 11 programming" by AppCoda</p>