fix:iOS ListNode item index outof range
This commit is contained in:
parent
77281b945f
commit
5113d73b37
@ -226,10 +226,13 @@ - (void)callItem:(NSUInteger)position height:(CGFloat)height {
|
||||
return;
|
||||
}
|
||||
self.itemHeights[@(position)] = @(height);
|
||||
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:position inSection:0];
|
||||
if (@available(iOS 10.0, *)) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[UIView performWithoutAnimation:^{
|
||||
if([self.view numberOfRowsInSection:0]<=position){
|
||||
return;
|
||||
}
|
||||
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:position inSection:0];
|
||||
[self.view reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone];
|
||||
}];
|
||||
});
|
||||
|
Reference in New Issue
Block a user