您好,欢迎来到华佗小知识。
搜索
您的当前位置:首页iOS 11 TableView heightForFooter

iOS 11 TableView heightForFooter

来源:华佗小知识

在iOS 11 中 -(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section 无论设置多大都没有效果,是因为没有实现另外一个代理方法-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section ,为了让footer的高度有效果,我们可以添加类似下面这样实现:

-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
    return [[UIView alloc]init];
}

OK !

Copyright © 2019- huatuo0.cn 版权所有 湘ICP备2023017654号-2

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

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