Grouped UITableView has 20px of extra padding at the bottom
You can use contentInset
to compensate the 20px extra bottom margin:
tableView.contentInset = UIEdgeInsetsMake(0, 0, -20, 0);
@frankWhite' solution works great, but here is a better solution to avoid typing 0.1, 0.001 or others to make it less ambiguous.
// Swift version
func tableView(tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
// remove bottom extra 20px space.
return CGFloat.min
}
// Objective-C version
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
// remove bottom extra 20px space.
return CGFLOAT_MIN;
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
return 0.01;
}
It's work for me
in Swift 3
override func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return CGFloat.leastNormalMagnitude
}