title: Creating a section title with UITableViewDiffableDataSource
body: <p>I'm tinkering a bit with <code>UITableViewDiffableDataSource</code> and I'm able to get a tableView to load without issue. I'm trying to create section headers in the tableView, however I've encountered some flakey behavior.</p>
  
  <p>The section enum enum defined as follows:</p>
  
  <pre class="lang-swift prettyprint-override"><code>    enum AlertLevel: String, Codable, CaseIterable {
          case green = "green"
          case yellow = "yellow"
          case orange = "orange"
          case red = "red"
      }
  </code></pre>
  
  <p>This is my implementation for <code>tableView(viewForHeaderInSection:)</code></p>
  
  <pre class="lang-swift prettyprint-override"><code>    func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -&gt; UIView? {
          let label = UILabel()
          label.text = dataSource.snapshot().sectionIdentifiers[section].rawValue.capitalized
          label.textColor = UIColor.black
  
          return label
      }
  </code></pre>
  
  <p>That gives me 4 labels stacked in header cells at the top of my tableView.</p>
  
  <p>I fired up Dash to RTFD and I saw <code>tableView(titleForHeaderInSection:)</code> is another way to skin that cat. So I threw this in, instead:</p>
  
  <pre class="lang-swift prettyprint-override"><code>    func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -&gt; String? {
          return dataSource.snapshot().sectionIdentifiers[section].rawValue.capitalized
      }
  </code></pre>
  
  <p>I threw a breakpoint in and it never gets hit. So I implemented <code>tableView(heightForHeaderInSection:)</code> and the header gets updated, but no string displays for the header.</p>
  
  <p>The table loads a LOT faster than it does "the old fashioned way" with <code>IndexPaths</code> (I'm using USGS earthquake database to learn <code>TableViewDiffableDataSource</code>), but I can't get the headers to show up.</p>
  
  <p>Anyone got an idea of how to get sections working on a <code>TableViewDiffableDataSource</code>? I have a hard time believing they'd let something like this into the wild without such basic functionality, so I'm left to conclude I'm fouling something up...what, I don't know :)</p>
  
  <p>Oh...and here's how I define my data source:</p>
  
  <pre><code>func makeDataSource() -&gt; UITableViewDiffableDataSource&lt;AlertLevel, Earthquake&gt; {
      return UITableViewDiffableDataSource(tableView: tableView) { tableView, indexPath, earthquake in
          let cell = tableView.dequeueReusableCell(withIdentifier: self.reuseID, for: indexPath)
          cell.textLabel?.text = earthquake.properties.title
          cell.detailTextLabel?.text = earthquake.properties.detail
  
          return cell
      }
  }
  </code></pre>