Using a Custom header Button to modify a section in tableview?
<p>I'm trying to give the ability to delete or add a section to the table view.
I created a custom header view in nib and added a label and 2 buttons to it.
The problem is, i can't connect the dots in deleting or adding a section.
This is my code so far:</p>

<pre><code>//Setup Header
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -&gt; UIView? {
    let header = tableView.dequeueReusableHeaderFooterView(withIdentifier: headerID) as! CustomHeader
    //Configure header...
    header.addBtn.addTarget(self, action:Selector(("add")), for: .touchUpInside)
    header.addBtn.tag = section

    switch section {
    case 0:
        header.sectionLBL.text = "Detail 1"
    case 1:
        header.sectionLBL.text = "Detail 2"
    default:
        break
    }
    return header
}

@IBAction func addButton(sender: UIButton) {
    //Add section code here...
}

@IBAction func delete(sender:UIButton){
    //delete section code here...
}
</code></pre>

<p>I was also trying to figure out how i would get the commit style to work with the buttons:</p>

<pre><code>    //Setup Editing Style for table view
    override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(true)


    }

    func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) {
//Editing styles for deletion or insertion...
}
</code></pre>