Skip to content

Commit 2d26249

Browse files
Add -didExitHierarchy internal hook.
1 parent 77412a2 commit 2d26249

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

AsyncDisplayKit/ASDisplayNode.mm

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,11 @@ - (BOOL)__shouldSize
210210
return YES;
211211
}
212212

213+
- (void)__exitedHierarchy
214+
{
215+
216+
}
217+
213218
- (void)_loadViewOrLayerIsLayerBacked:(BOOL)isLayerBacked
214219
{
215220
ASDN::MutexLocker l(_propertyLock);
@@ -1116,6 +1121,8 @@ - (void)didExitHierarchy
11161121
ASDisplayNodeAssertMainThread();
11171122
ASDisplayNodeAssert(_flags.isInExitHierarchy, @"You should never call -didExitHierarchy directly. Appearance is automatically managed by ASDisplayNode");
11181123
ASDisplayNodeAssert(!_flags.isInEnterHierarchy, @"ASDisplayNode inconsistency. __enterHierarchy and __exitHierarchy are mutually exclusive");
1124+
1125+
[self __exitedHierarchy];
11191126
}
11201127

11211128
- (void)reclaimMemory

AsyncDisplayKit/Private/ASDisplayNodeInternal.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ BOOL ASDisplayNodeSubclassOverridesSelector(Class subclass, SEL selector);
9090
// Swizzle to extend the builtin functionality with custom logic
9191
- (BOOL)__shouldLoadViewOrLayer;
9292
- (BOOL)__shouldSize;
93+
- (void)__exitedHierarchy;
9394

9495
- (void)__layout;
9596
- (void)__setSupernode:(ASDisplayNode *)supernode;

0 commit comments

Comments
 (0)