mirror of
https://github.com/HackPlan/AsyncDisplayKit.git
synced 2026-03-29 22:36:09 +08:00
When requerying node heights, go straight to super
This commit is contained in:
@@ -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];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user