美文网首页
UITableView

UITableView

作者: 李子有点酸 | 来源:发表于2019-12-08 23:06 被阅读0次

一、简介

做客户端的入门就是熟悉UITableView,里面封装了

二、

三、遇到的问题总结

3.1 cell的重用问题

cell为什么重用?重用会导致什么问题?

3.2 cell高度抖动

出现场景:当刷新tableView reloadData的时候会导致row上下跳动后恢复原样。

3.3 tableHeaderView高度固定

tableHeaderView不能向tableViewCell进行自适应,高度必须要设置,只是要注意,每次设置tabelHeaderView的frame之后要重新给tableView的tabelHeaderView赋值。

tableView.tableHeaderView?.frame = CGRect(x:0, y:0, width: view.bounds.width, height: view.bounds.height)

 tableView.tableHeaderView = tableView.tableHeaderView

链接:https://blog.csdn.net/weixin_38633659/article/details/90580224

相关文章

网友评论

      本文标题:UITableView

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