Migrate placeholder example project from 1.0 to 2.x (#1164)

This commit is contained in:
Andrew Yates
2018-10-17 08:02:47 -07:00
committed by Michael Schneider
parent 072df8962c
commit eab0fc200b
2 changed files with 4 additions and 4 deletions

View File

@@ -72,8 +72,8 @@
- (CGSize)calculateSizeThatFits:(CGSize)constrainedSize
{
CGSize textSize = [_textNode measure:constrainedSize];
CGSize shareSize = [_needyChildNode measure:constrainedSize];
CGSize textSize = [_textNode layoutThatFits:ASSizeRangeMake(CGSizeZero, constrainedSize)].size;
CGSize shareSize = [_needyChildNode layoutThatFits:ASSizeRangeMake(CGSizeZero, constrainedSize)].size;
return CGSizeMake(constrainedSize.width, textSize.height + 10.0 + shareSize.height);
}

View File

@@ -61,8 +61,8 @@
CGFloat constrainedWidth = CGRectGetWidth(bounds);
CGSize constrainedSize = CGSizeMake(constrainedWidth - 2 * padding, CGFLOAT_MAX);
CGSize postSize = [_postNode measure:constrainedSize];
CGSize imageSize = [_imageNode measure:constrainedSize];
CGSize postSize = [_postNode layoutThatFits:ASSizeRangeMake(CGSizeZero, constrainedSize)].size;
CGSize imageSize = [_imageNode layoutThatFits:ASSizeRangeMake(CGSizeZero, constrainedSize)].size;
_imageNode.frame = (CGRect){padding, padding, imageSize};
_postNode.frame = (CGRect){padding, CGRectGetMaxY(_imageNode.frame) + 10.0, postSize};