iOS 11 tableView 适配踩的一个坑

2017-09-20  本文已影响0人  AmazingMasterYi

升级iOS 11只有,发现
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section 。
这两个方法失效了
这时候只需要设置tableView的几个属性即可

    self.tableview.estimatedRowHeight = 0;
    self.tableview.estimatedSectionHeaderHeight = 0;
    self.tableview.estimatedSectionFooterHeight = 0;

亲测有效

上一篇 下一篇

猜你喜欢

热点阅读