Space Between Sections in UITableview

Joel picture Joel · May 21, 2015 · Viewed 65.8k times · Source

I need to reduce the space between two sections ofUITableView. I looked at this question but the solution doesn't allow for my custom header view because it combines the space of the footer and header.

Here is a picture of the UITableView. The black color is the UITableView background color.

tableview screenshot

Answer

Icaro picture Icaro · May 22, 2015

Did you try override this function:

override func tableView(tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
    return .leastNormalMagnitude
}