Open
Description
From @Yue-Wang-Google on August 25, 2016 20:5
Test case:
Apply the following patch to the Kittens example:
--- /Users/wangyue/Downloads/AsyncDisplayKit-master/examples/Kittens/Sample/KittenNode.mm 2016-08-25 10:03:06.000000000 -0700
+++ Sample/KittenNode.mm 2016-08-25 13:00:22.000000000 -0700
@@ -98,8 +98,12 @@
// lorem ipsum text, plus some nice styling
_textNode = [[ASTextNode alloc] init];
+ _textNode.truncationMode = NSLineBreakByTruncatingTail;
+ _textNode.maximumNumberOfLines = 2;
_textNode.attributedString = [[NSAttributedString alloc] initWithString:[self kittyIpsum]
attributes:[self textStyle]];
+ _textNode.truncationAttributedText = [[NSAttributedString alloc] initWithString:@"\u2026 More"
+ attributes:[self textStyle]];
[self addSubnode:_textNode];
// hairline cell separator
See the first node in the following screenshot.
Copied from original issue: facebookarchive/AsyncDisplayKit#2140