gsdios / SDAutoLayout

One line of code to implement automatic layout. 一行代码搞定自动布局!支持Cell和Tableview高度自适应,Label和ScrollView内容自适应,致力于做最简单易用的AutoLayout库。The most easy way for autoLayout. Based on runtime.
MIT License
5.9k stars 1.28k forks source link

快速滑动高度计算错误 #139

Closed zhaoyunyi closed 7 years ago

zhaoyunyi commented 7 years ago

swift 桥接 类库使用, 对应的是升级版本方法
return self.tableView.cellHeight(for: indexPath, model: model, keyPath: "gardenContent", cellClass: FriendsMainCell.classForCoder(), contentViewWidth: cellContentViewWith())

上拉新数据更新使用 ·tableView.reloadDataWithExistedHeightCache()

在非常快速的滑动情况下,会导致cell 的高度计算出错,另外如果加载新数据的时候 reloadDataWithExistedHeightCache 会有轻微卡顿, reload 则会明显卡顿,如何提升相关处理优化,谢谢作者,群里我问了。。没人能解决我的问题。。。万分感谢

gsdios commented 7 years ago

关于快速滑动计算出错的问题你先测试下demo会不会出现;reload需要重新计算所有cell的高度,会有一定耗时,目前的解决方案是reloadDataWithExistedHeightCache,只计算新增的数据对应的cell的高度