I have two buttons which i add it in one in table-footer and other one in table-header,i know how to hide the headerview of the table using this codetable.tableHeader
table.tableHeader
If you created your view in storyboard, you can hide it temporary with
tableView.tableHeaderView?.frame = CGRect.zero
To display it again, use
tableView.tableHeaderView?.frame = CGRect(x: 0, y: 0, width: tableView.frame.width, height: 50)