feat:fix ListNode crash on iOS 10 and iOS 11

This commit is contained in:
pengfei.zhou
2020-06-12 11:13:55 +08:00
committed by osborn
parent 5e0b1ea92b
commit 6b1040b8a2
3 changed files with 20 additions and 28 deletions

View File

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