[ASDisplayNode] Fix an issue that causes a node to sometimes return an outdated calculated size or size range (#808)

This commit is contained in:
Huy Nguyen
2018-05-21 18:36:19 +01:00
committed by GitHub
parent 06358d8662
commit b9ae6c4fa8
7 changed files with 129 additions and 31 deletions

View File

@@ -47,7 +47,12 @@ struct ASDisplayNodeLayout {
*/
ASDisplayNodeLayout()
: layout(nil), constrainedSize({{0, 0}, {0, 0}}), parentSize({0, 0}), requestedLayoutFromAbove(NO), version(0) {};
/**
* Returns whether this is valid for a given version
*/
BOOL isValid(NSUInteger version);
/**
* Returns whether this is valid for a given constrained size, parent size, and version
*/