how to get tableView section header
<p>This may sound like a weird question as obviously there is always <code>viewForHeaderInSection</code> method available when working with tables in iOS.</p>

<p>However, to work with that function, one needs to reload the data of that table, something which I, in this case, want to avoid.</p>

<p>I have a button in my <code>UITableViewSectionHeader</code>, and I want to disable it on a certain point in my app - again - without having to reload the tableview data.
I tried to do that with this piece code:</p>

<pre><code>let currentTable = self.playerTables![i] as! UITableView
let header = currentTable.headerViewForSection(0)! as UITableViewHeaderFooterView!
let view = header.contentView as UIView
view.userInteractionEnabled = false
</code></pre>

<p>my app crashes when running this code, as the <code>header</code> is nil when loading the contentView. It does initialize when I call the <code>currentTable.headerViewForSection(0)!</code> code, but is nil again at the very next line.</p>

<p>I have checked whether the section i'm referring to is correct or not, checked apple docs and google/so and have not been able to find any reference on accessing the section header in the way I want. <strong>Is there a way?</strong></p>