Grouped UITableView has 20px of extra padding at the bottom

前端 未结 12 1124
长发绾君心
长发绾君心 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:53

    This is the only working solution I guess.I tried setting tableFooterView and tableHeaderView to nil. But nothing happened.Then the following solution worked .Returning zero "return 0;" has no effect.We should return the lowest possible height.

     - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
            return CGFLOAT_MIN;
        }
    
     - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
            return CGFLOAT_MIN;
        }
    

    NOTE: This is what I got when printed the values.

    CGFLOAT_MAX = 340282346638528859811704183484516925440.000000

    CGFLOAT_MIN = 0.000000

提交回复
热议问题