您好,欢迎来到知库网。
搜索
您的当前位置:首页升级Xcode9之后,section间距变大

升级Xcode9之后,section间距变大

来源:知库网

今天早上升级Xcode9 和 iOS11之后,发现app的有些TableView的section高度变大了,仔细检查之后发现这些都是group类型的TableView,原来是因为设置group类型,会自动设置高度自适应,导致- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section方法和- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section不起作用了.只需要设置为0就好了

        _settingView.estimatedRowHeight = 0;
        _settingView.estimatedSectionFooterHeight = 0;
        _settingView.estimatedSectionHeaderHeight = 0;

Copyright © 2019- zicool.com 版权所有 湘ICP备2023022495号-2

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务