Remove aggregate CGRect initializers in ASDataController

This commit is contained in:
Adlai Holler
2016-07-01 11:47:05 -07:00
parent 8c3025bb12
commit ebaa2c157e

View File

@@ -143,8 +143,9 @@ static void *kASSizingQueueContext = &kASSizingQueueContext;
*/
- (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;
}
/**
@@ -849,8 +850,9 @@ static void *kASSizingQueueContext = &kASSizingQueueContext;
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;