title: Why does overriding tableView(:viewForHeaderInSection:) change the results
body: <p>I have a simple implementation of a table view with no header.  This is the result that I'm going for.</p>
  
  <pre><code>class NavigationController: UINavigationController {
      override func viewDidLoad() {
          super.viewDidLoad()
          self.pushViewController(MyTable(style: .grouped), animated: false)
      }
  }
  
  class MyTable: UITableViewController {
      override func viewDidLoad() {
          super.viewDidLoad()
      }
  
      override func viewWillAppear(_ animated: Bool) {
          super.viewWillAppear(animated)
      }
  
      override func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -&gt; CGFloat {
          return CGFloat.leastNormalMagnitude
      }
  
      override func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -&gt; CGFloat {
          return CGFloat.leastNormalMagnitude
      }
  
      override func numberOfSections(in tableView: UITableView) -&gt; Int {
          return 1
      }
  
      override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
          return 3
      }
  
      override func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -&gt; UIView? {
          assert(false)
      }
  
      override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
          return UITableViewCell()
      }
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/Vsxj1.png" alt="table view with no header"></p>
  
  <p>Notice that I have an override for <code>viewForHeaderInSection</code> which never gets called which is expected since the height I give is essentially zero.</p>
  
  <pre><code>override func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -&gt; UIView? {
      assert(false)
  }
  </code></pre>
  
  <p>When I remove the definition of the above function, then I get a different result.  Why does this happen, and is there a way to get the same result without overriding this method?</p>
  
  <p><img src="https://i.stack.imgur.com/hScxk.png" alt="table view with header"></p>