From 52b84bac01cbae3cdd005dd3c08b0c4b3c1c5ca0 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Thu, 10 Jan 2019 08:50:23 +0100 Subject: [PATCH] Use cell mode while wrapping supplementary nodes (#1282) --- Source/ASCollectionView.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/ASCollectionView.mm b/Source/ASCollectionView.mm index 4543d1196..06ff05637 100644 --- a/Source/ASCollectionView.mm +++ b/Source/ASCollectionView.mm @@ -2044,6 +2044,7 @@ - (ASCellNodeBlock)dataController:(ASDataController *)dataController supplementa } // Wrap the node block + BOOL disableRangeController = ASCellLayoutModeIncludes(ASCellLayoutModeDisableRangeController); __weak __typeof__(self) weakSelf = self; return ^{ __typeof__(self) strongSelf = weakSelf; @@ -2051,6 +2052,9 @@ - (ASCellNodeBlock)dataController:(ASDataController *)dataController supplementa ASDisplayNodeAssert([node isKindOfClass:[ASCellNode class]], @"ASCollectionNode provided a non-ASCellNode! %@, %@", node, strongSelf); + if (!disableRangeController) { + [node enterHierarchyState:ASHierarchyStateRangeManaged]; + } if (node.interactionDelegate == nil) { node.interactionDelegate = strongSelf; }