mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
[Layout API] Rename ASStaticLayoutSpec to ASAbsoluteLayoutSpec (#2288)
* Rename static to absolute * Fix examples, rename ASAbsoluteLayoutSpec class method * rename +staticLayoutSpecWithChildren to +absoluteLayoutSpecWithChildren * address Michael's comments
This commit is contained in:
committed by
Adlai Holler
parent
37d9d401b3
commit
87595c7d3b
@@ -359,16 +359,16 @@ typedef ASLayoutSpec *(^OverviewDisplayNodeSizeThatFitsBlock)(ASSizeRange constr
|
||||
[parentNode addSubnode:childNode];
|
||||
[mutableLayoutSpecData addObject:parentNode];
|
||||
|
||||
#pragma mark ASStaticLayoutSpec
|
||||
#pragma mark ASAbsoluteLayoutSpec
|
||||
childNode = [self childNode];
|
||||
// Add a layout position to the child node that the static layout spec will pick up and place it on that position
|
||||
// Add a layout position to the child node that the absolute layout spec will pick up and place it on that position
|
||||
childNode.style.layoutPosition = CGPointMake(10.0, 10.0);
|
||||
|
||||
parentNode = [self parentNodeWithChild:childNode];
|
||||
parentNode.entryTitle = @"ASStaticLayoutSpec";
|
||||
parentNode.entryTitle = @"ASAbsoluteLayoutSpec";
|
||||
parentNode.entryDescription = @"Allows positioning children at fixed offsets.";
|
||||
parentNode.sizeThatFitsBlock = ^ASLayoutSpec *(ASSizeRange constrainedSize) {
|
||||
return [ASStaticLayoutSpec staticLayoutSpecWithChildren:@[childNode]];
|
||||
return [ASAbsoluteLayoutSpec absoluteLayoutSpecWithChildren:@[childNode]];
|
||||
};
|
||||
[parentNode addSubnode:childNode];
|
||||
[mutableLayoutSpecData addObject:parentNode];
|
||||
|
||||
Reference in New Issue
Block a user