title: Reduce space between header and table view cell in swift
body: <p>I have table view with custom header and a cell with single section.
  I want to reduce the space between the header and the 1st cell.
  I have used heightforrow method as follows:</p>
  <pre><code>func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -&gt; CGFloat {
          if tableView == tableview1
          {
              return 1
          }
          else
          {
              return 0
          }
      }
  </code></pre>
  <p>This did not have any effect on the spacing.
  The height of the header is 774.The cell starts from 798 and it is grayed out as shown in the image.
  <a href="https://i.stack.imgur.com/d8sTF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/d8sTF.png" alt="enter image description here" /></a></p>
  <p>How to reduce the space of it which is shown below.</p>
  <p><a href="https://i.stack.imgur.com/J6Jzb.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/J6Jzb.jpg" alt="enter image description here" /></a></p>