iOS踩过的坑系列iOS UI

iOS踩过的坑之UITableView的footer和heade

2019-04-24  本文已影响0人  Shaw1211

heightForFooterInSection以及heightForHeaderInSection方法中,如果想设置高度为0,不能直接返回0,可以设置返回0.01
例如

- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
  return 0.01;
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
  return 0.01;
}
上一篇下一篇

猜你喜欢

热点阅读