更新至iOS11后,真是一堆莫名其妙的BUG~ 蛋疼的厲害。。。
最近發現Group樣式的TableView,怎么設置頭部或底部高度都沒用
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
return 10;
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
return 10;
}
試了很多方法,終于找到解決問題,只要直接隨便設置下面兩個屬性值后,上面兩個方法就會響應啦
_tableView.sectionHeaderHeight = 0.01;
_tableView.sectionFooterHeight = 0.01;