I have a tableview with this awkward gap between the top of the first section and the nav bar. I tried the following solutions I found online to hide the section but none seem to be working here:
tableView.tableHeaderView?.frame = CGRect.zero
also tried adding
func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
return nil
}
Neither seem to work. Any suggestions?
2
Answers
Put this in viewDidLoad: