3

Grouped UITableview has an extra small space on the bottom on iOS 15+

this functions doesn't help

func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
    .leastNonzeroMagnitude
}

tableView.sectionHeaderTopPadding = .leastNonzeroMagnitude

example

Storyboard

SPatel
  • 4,768
  • 4
  • 32
  • 51
Mixorok
  • 125
  • 9

1 Answers1

-1

You can try


func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
        return nil
    }
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
        .leastNormalMagnitude
    }
hosejose
  • 11
  • 1
  • This methods doesn't work. Please read the question. – Mixorok Aug 26 '22 at 09:16
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Aug 31 '22 at 02:41
  • I had this 20pt padding at the bottom of each section with `tableView(_:heightForFooterInSection:)` returning `.leastNormalMagnitude`, too. But when I returned `nil` from `tableView(_:viewForFooterInSection:)`, it worked and the bottom padding disappeared – Ostap4ik Jul 26 '23 at 15:42