Add baseline support to ASStackLayoutSpec

This commit is contained in:
ricky cancro
2015-08-12 16:55:12 -07:00
committed by rcancro
parent 80bbf79046
commit f289b3345a
8 changed files with 56 additions and 2 deletions

View File

@@ -355,6 +355,9 @@ ASDISPLAYNODE_INLINE CGFloat ceilPixelValue(CGFloat f)
self.isAccessibilityElement = YES;
}
});
self.ascender = [[attributedString attribute:NSFontAttributeName atIndex:0 effectiveRange:NULL] ascender];
self.descender = [[attributedString attribute:NSFontAttributeName atIndex:attributedString.length - 1 effectiveRange:NULL] descender];
}
#pragma mark - Text Layout