CoderMikeHe/WeChat

heightForHeaderInSection 执行两次的问题

linKnowEasy opened this issue · 1 comments

推测是 estimatedSectionHeaderHeight 有关
设置为 0 之后, 一个调用是负责重绘, 一个调用是负责 reload 之后 content offset 保持不变, 所以会调用两次

如果不设置 estimatedSectionHeaderHeight 为 0 , 则只会 reload 时 调用一次,content offset 则是 系统对 header 高度动态预估, 会导致 tableview 的 contetnoffset 异常

以上理论是我推测的
复现方法 , 修改 estimatedSectionHeaderHeight 的值, 滚动几次 点击全文, 再滚动

好的,我也发现了这个套路。谢谢哈