ios 11 适配 TableView的 heightForHeaderInSection 代理不走的方法

如果iOS11 系统使用tableView的header要做成一定的效果。只需在设置tableView的时候加入这几句 _tableView.estimatedRowHeight = 0; _tableView.estimatedSectionHeaderHeight = 0; _tableView.estimatedSectionFooterHeight = 0; 然后就可以了。iOS11默认开启Self-Sizing,关闭Self-Sizing即可。

你可能感兴趣的:(ios 11 适配 TableView的 heightForHeaderInSection 代理不走的方法)