Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1840 from facebook/AHRemoveAggregateInitializer
Browse files Browse the repository at this point in the history
[ASDataController] Remove Aggregate CGRect Initializer
  • Loading branch information
Adlai Holler authored Jul 1, 2016
2 parents 8c3025b + ebaa2c1 commit d80a443
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions AsyncDisplayKit/Details/ASDataController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,9 @@ - (void)layoutLoadedNodes:(NSArray<ASCellNode *> *)nodes fromContexts:(NSArray<A
*/
- (void)_layoutNode:(ASCellNode *)node withConstrainedSize:(ASSizeRange)constrainedSize
{
CGSize size = [node measureWithSizeRange:constrainedSize].size;
node.frame = { .size = size };
CGRect frame = CGRectZero;
frame.size = [node measureWithSizeRange:constrainedSize].size;
node.frame = frame;
}

/**
Expand Down Expand Up @@ -849,8 +850,9 @@ - (void)_relayoutNodesOfKind:(NSString *)kind
for (ASCellNode *node in section) {
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:rowIndex inSection:sectionIndex];
ASSizeRange constrainedSize = [self constrainedSizeForNodeOfKind:kind atIndexPath:indexPath];
CGSize size = [node measureWithSizeRange:constrainedSize].size;
node.frame = { .size = size };
CGRect frame = CGRectZero;
frame.size = [node measureWithSizeRange:constrainedSize].size;
node.frame = frame;
rowIndex += 1;
}
sectionIndex += 1;
Expand Down

0 comments on commit d80a443

Please sign in to comment.