[ASDisplayNode] added asyncTraitCollectionDidChange method (#1831)

Subclasses can override this method to react to a trait collection change
This commit is contained in:
ricky
2016-06-30 19:45:29 -07:00
committed by appleguy
parent 8804342a98
commit 8c3025bb12
3 changed files with 23 additions and 1 deletions

View File

@@ -465,6 +465,13 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (NSString *)descriptionForRecursiveDescription;
/**
* @abstract Called when the node's ASTraitCollection changes
*
* @discussion Subclasses can override this method to react to a trait collection change.
*/
- (void)asyncTraitCollectionDidChange;
@end
#define ASDisplayNodeAssertThreadAffinity(viewNode) ASDisplayNodeAssert(!viewNode || ASDisplayNodeThreadIsMain() || !(viewNode).nodeLoaded, @"Incorrect display node thread affinity - this method should not be called off the main thread after the ASDisplayNode's view or layer have been created")