iOS: List should clear height infos if refresh

This commit is contained in:
pengfei.zhou 2023-08-11 11:48:13 +08:00 committed by jingpeng
parent a9c5281cc9
commit e8f22b16d3

View File

@ -174,6 +174,7 @@ - (void)blendView:(UITableView *)view forPropName:(NSString *)name propValue:(id
[self removeSubModel:obj];
}];
[self.itemViewIds removeAllObjects];
[self.itemHeights removeAllObjects];
self.needReload = true;
}
} else if ([@"batchCount" isEqualToString:name]) {
@ -723,6 +724,7 @@ - (void)reload {
[self removeSubModel:obj];
}];
[self.itemViewIds removeAllObjects];
[self.itemHeights removeAllObjects];
dispatch_async(dispatch_get_main_queue(), ^{
self.rowCount = self.itemCount + (self.loadMore ? 1 : 0);
[self.view reloadData];