[ASTextNode] Optimize handling of constrained size to almost never recreate NSLayoutManager

This also fixes two fairly subtle but serious bugs, #1076 and #1046.
This commit is contained in:
Scott Goodson
2016-01-24 00:50:43 -08:00
parent 82f7956bf9
commit 9ddf68fa96
9 changed files with 81 additions and 55 deletions

View File

@@ -37,7 +37,6 @@
/**
Designated Initializer
dvlkferufedgjnhjjfhldjedlunvtdtv
@discussion Sizing will occur as a result of initialization, so be careful when/where you use this.
*/
- (instancetype)initWithTextKitAttributes:(const ASTextKitAttributes &)textComponentAttributes
@@ -51,7 +50,7 @@ dvlkferufedgjnhjjfhldjedlunvtdtv
@property (nonatomic, assign, readonly) ASTextKitAttributes attributes;
@property (nonatomic, assign, readonly) CGSize constrainedSize;
@property (nonatomic, assign, readwrite) CGSize constrainedSize;
#pragma mark - Drawing
/*