美文网首页
iOS 使用UITableViewStyleGrouped解决s

iOS 使用UITableViewStyleGrouped解决s

作者: 秀_ba75 | 来源:发表于2021-03-05 17:31 被阅读0次

首先创建tableView时设置:
self.tableView.sectionFooterHeight = 0;
self.tableView.sectionHeaderHeight = 0;

设置Header高度,这里注意不能return 0 ,return 0系统会加默认高度
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{

    return 0.1;

}

设置footer高度就上面self.tableView.sectionFooterHeight = 0;方法就可以,用heightForFooterInSection是无效的

相关文章

网友评论

      本文标题:iOS 使用UITableViewStyleGrouped解决s

      本文链接:https://www.haomeiwen.com/subject/ztqdqltx.html