1.隐藏尾部或者头部,配套使用
//注册头部id tv.register(JYWithdrawalRecordSectionView.self, forheaderfooterViewReuseIdentifier: sectionHeaderID) //设置高度;注意此处写死的。 如果用VFL 或者自适应,没效果的 tv.sectionHeaderHeight = 60 //隐藏尾部 这两行缺一不可, 不然显示默认的20高度的尾部view,隐藏头部同理 tv.tableFooterView = nil tv.sectionFooterHeight = 0.0001
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { let headerV = tableView.dequeueReusableheaderfooterView(withIdentifier: sectionHeaderID) as! JYWithdrawalRecordSectionView headerV.updataData(data: dataArr[section]) headerV.clickSection = { [weak self] in self?.handleSectionClick(section: section) } return headerV }
3.
<style></style> <style></style>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。