title: Creating a grey space between the header view and the first cell
body: <p>I am trying to create a grey space between the header view (with the two buttons) and the dynamic tableview as shown here:</p>
  
  <p><a href="https://i.stack.imgur.com/L6wPT.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/L6wPT.jpg" alt="enter image description here"></a></p>
  
  <p>This is what I was able to create so far:</p>
  
  <p><a href="https://i.stack.imgur.com/2ncId.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2ncId.png" alt="enter image description here"></a></p>
  
  <p>Now there is a line between the header view and the dynamic table view. However, I would like to have a grey space as shown in the picture above. I tried using <code>Grouped</code> instead of <code>Plain</code>. And I hypothesize that this is a way to achieve my goal because it does add grey to my view like so but only at the bottom:</p>
  
  <p><a href="https://i.stack.imgur.com/tIrqa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tIrqa.png" alt="enter image description here"></a></p>
  
  <p>So I figured if I can add some padding unto my headerview, that cause the grey to show since I think the background is grey now. So I tried writing some code:</p>
  
  <pre><code>override func viewDidLayoutSubviews() {
      super.viewDidLayoutSubviews()
  
      let headerView = taskListTableView.tableHeaderView
  
      headerView!.setNeedsLayout()
      headerView!.layoutIfNeeded()
      let cGPoint = CGPoint(x: 0.0, y: 0.0)
      let cGHeight = CGSize.init(width: 0, height: 10)
      var frame = headerView!.frame
      headerView!.bounds = CGRect(origin: cGpoint, size: cGHeight)
  
      frame.size.height = CGFloat(30.0)
      headerView!.frame = frame
  
      taskListTableView.tableHeaderView = headerView
  }
  </code></pre>
  
  <p>But this code is won't compile. Am I on the right track? What else could I do to achieve this effect?</p>