In my application also I've experienced an issue like this. I've set top edge inset of tableView zero. Also tried set false
for automaticallyAdjustsScrollViewInsets
. But didn't work.
Finally I got a working solution. I don't know is this the correct way. But implementing heightForHeaderInSection
delegate method worked for me. You have to return a non-zero value to work this (return zero will display same space as before).
override func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return 0.1
}