My tableview has an extra space at the bottom, as you see in the picture:
All the rows in the tableView have a fixed height of 71pt.
I had the same issue, with latest Xcode (11.3) with latest iOS (13.3) iPhone. I tried many answers, but none worked.
My tableView has top, bottom, leading, and trail constraints but somehow there is large space at bottom below the last cell. (tableView.contentSize.height was almost double of what is needed) Data for tableView is not dynamic at all.It happens both when the view controller that has it shows it and when tableView is hidden then shown again.
I solved it by using scrollView's delegate method like below, so that when the user starts dragging, height is adjusted. For me, it works so great, hope for you, too!
// this is the best place to adjust the contentSize.height of tableView.
func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
print("scrollViewWillBeginDragging():") // optional
// replace allParkingGeos.count with your data for tableView
tableView.contentSize.height = CGFloat(allParkingGeos.count) * cellHeight
}