Grouped UITableView has 20px of extra padding at the bottom

前端 未结 12 1138
长发绾君心
长发绾君心 2020-12-23 09:34

Grouped table views seem to have extra padding on the bottom in iOS 6 (iOS 5 does not have it), but I can\'t find any documentation that suggests this is correct / expected

12条回答
  •  感动是毒
    2020-12-23 09:59

    @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;
    } 
    

提交回复
热议问题