title: Why UITableView.tableHeaderView property only accepts non-zero value when modifying its frame height?
body: <p>Can anyone tell me why UITableView's <code>tableHeaderView</code> property only accepts non zero value?</p>
  <p>I'm trying to modify the height value of my UITableView's <code>tableHeaderView</code> property for narrowing upper margin.</p>
  <p>Below is the way I approached.</p>
  <blockquote>
  <p><strong>Setting the height property value of tableHeaderView in UITableView as 0 would actually remove the upper margin</strong></p>
  </blockquote>
  <p>However, nothing has changed when applying the code as below.</p>
  <pre class="lang-swift prettyprint-override"><code>//UIView has the tableView property for its one of sub views
  tableView.tableHeaderView = UIView(frame: CGRect(origin: .zero, size: CGSize(width: 0, height: 0)))
  </code></pre>
  <p>I searched online about this and found some
  explanation from <a href="https://developer.apple.com/documentation/uikit/uitableview/1614904-tableheaderview" rel="nofollow noreferrer">apple reference</a>
  <a href="https://i.stack.imgur.com/shx2S.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/shx2S.png" alt="enter image description here" /></a>
  It seems like tableHeaderView property only accepts non zero value for its modification.
  So I just set the value for height setting as <code>CGFloat.leastNormalMagnitude</code> and it just worked.</p>
  <pre class="lang-swift prettyprint-override"><code>tableView.tableHeaderView = UIView(frame: CGRect(origin: .zero, size: CGSize(width: 0, height: CGFloat.leastNormalMagnitude)))
  </code></pre>
  <p>The point I'm curious about is that I still cannot undertstand why zero value and <code>leastNormalMagnitude</code> value make difference.
  Shouldn't setting frame height value as 0 actually remove the UIView on screen?</p>