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

您好 我遇到以下问题 #254

Open 18667366881 opened 6 years ago

18667366881 commented 6 years ago

for (NSUInteger i=0; i<array.count; i++) { [self.dataarray insertObject:array[i] atIndex:0]; } [self.tableView reloadData]; [self.tableView.mj_header endRefreshing];

下拉刷新 把数据插入到 最前面 刷新时 布局错乱 请问时啥原因 谢谢

18667366881 commented 6 years ago

去掉这一行 就没有布局错乱问题 请问为什么 [cell useCellFrameCacheWithIndexPath:indexPath tableView:tableView];

czl0325 commented 6 years ago

用了以前的高度缓存了,你必须要之前的高度缓存都清空掉,因为你是插到第0行,原来第0行的高度已经被缓存了,所以还是用之前第0行的高度。