[ASTextKitFontSizeAdjuster] Use the constrainedSize’s height to adjust font scaling (#2309)

* refactor shrinking logic

# Conflicts:
#	AsyncDisplayKit/TextKit/ASTextKitFontSizeAdjuster.mm

* fix ASTraitCollection sample

* updated comments.

* fix build errors

* adlai’s comments
This commit is contained in:
ricky
2016-10-04 10:01:50 -07:00
committed by Adlai Holler
parent d6e5e27c39
commit 872aad220f
4 changed files with 54 additions and 51 deletions

View File

@@ -33,8 +33,8 @@ static NSString *kLinkAttributeName = @"PlaceKittenNodeLinkAttributeName";
return nil;
_textNode = [[ASTextNode alloc] init];
_textNode.flexGrow = YES;
_textNode.flexShrink = YES;
_textNode.style.flexGrow = YES;
_textNode.style.flexShrink = YES;
_textNode.maximumNumberOfLines = 3;
[self addSubnode:_textNode];