iOS:Fix List crash on iOS 9.0

This commit is contained in:
pengfei.zhou 2020-01-17 16:50:32 +08:00 committed by osborn
parent 972550f668
commit c813787318

View File

@ -222,9 +222,15 @@ - (void)callItem:(NSUInteger)position height:(CGFloat)height {
} }
self.itemHeights[@(position)] = @(height); self.itemHeights[@(position)] = @(height);
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:position inSection:0]; NSIndexPath *indexPath = [NSIndexPath indexPathForRow:position inSection:0];
if (@available(iOS 10.0, *)) {
[UIView performWithoutAnimation:^{ [UIView performWithoutAnimation:^{
[self.view reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone]; [self.view reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone];
}]; }];
} else {
dispatch_async(dispatch_get_main_queue(), ^{
[self.view reloadData];
});
}
} }
- (DoricViewNode *)subNodeWithViewId:(NSString *)viewId { - (DoricViewNode *)subNodeWithViewId:(NSString *)viewId {