Add isDirty property and make markDirty less crashy/more performant.
Summary: For some internal Instagram diffs, and some external ones (auto-detection of dirty nodes). We need to give the dirty properties a little love. This adds a getter to find out if your node is dirty, and makes sure that the leaf node is properly setup before it is marked dirty to prevent a crash. Reviewed By: emilsjolander Differential Revision: D4549241 fbshipit-source-id: 36eda6fdb4ea7f968d126aab6da67896f4a01d40
This commit is contained in:
committed by
Facebook Github Bot
parent
abf142ea3f
commit
55fe6f0bc9
@@ -111,6 +111,12 @@
|
||||
*/
|
||||
@property (nonatomic, readonly, assign) BOOL isLeaf;
|
||||
|
||||
/**
|
||||
Return's a BOOL indicating if a view is dirty. When a node is dirty
|
||||
it usually indicates that it will be remeasured on the next layout pass.
|
||||
*/
|
||||
@property (nonatomic, readonly, assign) BOOL isDirty;
|
||||
|
||||
/**
|
||||
Mark that a view's layout needs to be recalculated. Only works for leaf views.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user