From 8f58cf4ff9d513167dfe44af3ee85c15c9cf02da Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Fri, 2 Sep 2016 11:12:51 -0700 Subject: [PATCH] When requerying node heights, go straight to super --- AsyncDisplayKit/ASTableView.mm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/AsyncDisplayKit/ASTableView.mm b/AsyncDisplayKit/ASTableView.mm index 8dc50524..ae978ba5 100644 --- a/AsyncDisplayKit/ASTableView.mm +++ b/AsyncDisplayKit/ASTableView.mm @@ -484,9 +484,9 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; if (_ignoreNodesConstrainedWidthChange) { _ignoreNodesConstrainedWidthChange = NO; } else { - [self beginUpdates]; + [super beginUpdates]; [_dataController relayoutAllNodes]; - [self endUpdates]; + [super endUpdates]; } } @@ -1185,10 +1185,10 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; // is the same for all cells (because there is no easy way to get that individual value before the node being assigned to a _ASTableViewCell). // Also, in many cases, some nodes may not need to be re-measured at all, such as when user enters and then immediately leaves editing mode. // To avoid premature optimization and making such assumption, as well as to keep ASTableView simple, re-measurement is strictly done on main. - [self beginUpdates]; + [super beginUpdates]; CGSize calculatedSize = [[node measureWithSizeRange:constrainedSize] size]; node.frame = CGRectMake(0, 0, calculatedSize.width, calculatedSize.height); - [self endUpdates]; + [super endUpdates]; } }