iOS: fix iOS 11 & iOS 12 DoricListNode crash

This commit is contained in:
pengfei.zhou 2021-04-22 15:41:09 +08:00 committed by osborn
parent cdd25caa7d
commit c82fdf1a0d

View File

@ -252,7 +252,7 @@ - (void)callItem:(NSUInteger)position height:(CGFloat)height {
} }
NSUInteger currentCount = self.itemCount + (self.loadMore ? 1 : 0); NSUInteger currentCount = self.itemCount + (self.loadMore ? 1 : 0);
self.itemHeights[@(position)] = @(height); self.itemHeights[@(position)] = @(height);
if (@available(iOS 10.0, *)) { if (@available(iOS 12.0, *)) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
if (self.view.doricLayout.heightSpec == DoricLayoutFit) { if (self.view.doricLayout.heightSpec == DoricLayoutFit) {
DoricSuperNode *node = self.superNode; DoricSuperNode *node = self.superNode;