Don't invalidateCalculatedLayout when ASTextCellNode's text is changed

Because calling -invalidateCalculatedLayout removes the current constrained size and therefore any -setNeedsLayout calls in the future won't have a valid constrained size to proceed.

Instead, cell nodes should be relaid-out using the new APIs introduced in ASTableView and ASCollectionView, which are -relayoutRowAtIndexPath:withRowAnimation and -relayoutItemAtIndexPath, respectively.
This commit is contained in:
Huy Nguyen 2015-10-12 21:34:44 +03:00
parent 12c087d967
commit 91f3ba1f49

View File

@ -123,7 +123,6 @@ static const CGFloat kFontSize = 18.0f;
_textNode.attributedString = [[NSAttributedString alloc] initWithString:_text
attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:kFontSize]}];
[self invalidateCalculatedLayout];
}
@end