mirror of
https://github.com/TextureGroup/Texture.git
synced 2026-04-07 19:17:39 +00:00
[Layout] Further deprecation steps for preferredFrameSize (#2255)
* Deprecate preferredFrameSize - Remove all support for preferredFrameSize in ASDK - preferredFrameSize setter calls through and sets the width and height of the node - preferredFrameSize getter tries to return a CGSize based on the width and height properties otherwise if this is not possible it throws * Address comments * Return CGSizeZero for preferredFrameSize unless width and height are ASDimensionUnitPoints * Better comment for preferredFrameSize and remove lock in calculateSizeThatFits:
This commit is contained in:
committed by
Adlai Holler
parent
e8f01f082a
commit
f574f2c54e
@@ -510,19 +510,7 @@
|
||||
if (UIEdgeInsetsEqualToEdgeInsets(UIEdgeInsetsZero, contentEdgeInsets) == NO) {
|
||||
spec = [ASInsetLayoutSpec insetLayoutSpecWithInsets:contentEdgeInsets child:spec];
|
||||
}
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
if (CGSizeEqualToSize(self.preferredFrameSize, CGSizeZero) == NO) {
|
||||
#if DEBUG
|
||||
NSLog(@"Using -[ASDisplayNde preferredFrameSize] is deprecated.");
|
||||
#endif
|
||||
stack.style.width = ASDimensionMake(ASDimensionUnitPoints, self.preferredFrameSize.width);
|
||||
stack.style.height = ASDimensionMake(ASDimensionUnitPoints, self.preferredFrameSize.height);
|
||||
spec = [ASStaticLayoutSpec staticLayoutSpecWithChildren:@[stack]];
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
|
||||
if (_backgroundImageNode.image) {
|
||||
spec = [ASBackgroundLayoutSpec backgroundLayoutSpecWithChild:spec background:_backgroundImageNode];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user