diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index 8686ce6cca..7c2bcfa42d 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -527,7 +527,7 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; ASCellNode *cellNode = [self nodeForItemAtIndexPath:indexPath]; if (cellNode.neverShowPlaceholders) { - [cellNode recursivelyEnsureDisplay]; + [cellNode recursivelyEnsureDisplaySynchronously:YES]; } } diff --git a/AsyncDisplayKit/ASDisplayNode+Beta.h b/AsyncDisplayKit/ASDisplayNode+Beta.h index 98efc3d08a..473b565f27 100644 --- a/AsyncDisplayKit/ASDisplayNode+Beta.h +++ b/AsyncDisplayKit/ASDisplayNode+Beta.h @@ -16,7 +16,8 @@ /** * @abstract Recursively ensures node and all subnodes are displayed. + * @see Full documentation in ASDisplayNode+FrameworkPrivate.h */ -- (void)recursivelyEnsureDisplay; +- (void)recursivelyEnsureDisplaySynchronously:(BOOL)synchronously; @end diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index 8d0089ce8e..50bd7e5e12 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -1543,9 +1543,9 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) recursivelyTriggerDisplayForLayer(layer, shouldBlock); } -- (void)recursivelyEnsureDisplay +- (void)recursivelyEnsureDisplaySynchronously:(BOOL)synchronously { - [self __recursivelyTriggerDisplayAndBlock:YES]; + [self __recursivelyTriggerDisplayAndBlock:synchronously]; } - (void)setShouldBypassEnsureDisplay:(BOOL)shouldBypassEnsureDisplay diff --git a/AsyncDisplayKit/ASTableView.mm b/AsyncDisplayKit/ASTableView.mm index b2f6457f3d..b3e423a030 100644 --- a/AsyncDisplayKit/ASTableView.mm +++ b/AsyncDisplayKit/ASTableView.mm @@ -558,7 +558,7 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; ASCellNode *cellNode = [self nodeForRowAtIndexPath:indexPath]; if (cellNode.neverShowPlaceholders) { - [cellNode recursivelyEnsureDisplay]; + [cellNode recursivelyEnsureDisplaySynchronously:YES]; } } diff --git a/AsyncDisplayKit/ASViewController.m b/AsyncDisplayKit/ASViewController.m index 9679785558..b626c7169c 100644 --- a/AsyncDisplayKit/ASViewController.m +++ b/AsyncDisplayKit/ASViewController.m @@ -57,7 +57,7 @@ { if (_ensureDisplayed && self.neverShowPlaceholders) { _ensureDisplayed = NO; - [self.node recursivelyEnsureDisplay]; + [self.node recursivelyEnsureDisplaySynchronously:YES]; } [super viewDidLayoutSubviews]; } diff --git a/AsyncDisplayKit/Details/ASRangeHandlerRender.mm b/AsyncDisplayKit/Details/ASRangeHandlerRender.mm index bb4de3c092..6dcf11044d 100644 --- a/AsyncDisplayKit/Details/ASRangeHandlerRender.mm +++ b/AsyncDisplayKit/Details/ASRangeHandlerRender.mm @@ -65,7 +65,7 @@ if (![ASDisplayNode shouldUseNewRenderingRange]) { - [node recursivelyEnsureDisplay]; // Need to do this without waiting + [node recursivelyEnsureDisplaySynchronously:NO]; } else { // Add the node's layer to an off-screen window to trigger display and mark its contents as non-volatile. // Use the layer directly to avoid the substantial overhead of UIView heirarchy manipulations. diff --git a/AsyncDisplayKit/Private/ASDisplayNode+FrameworkPrivate.h b/AsyncDisplayKit/Private/ASDisplayNode+FrameworkPrivate.h index 5834bc3b9a..8deebb9bc6 100644 --- a/AsyncDisplayKit/Private/ASDisplayNode+FrameworkPrivate.h +++ b/AsyncDisplayKit/Private/ASDisplayNode+FrameworkPrivate.h @@ -90,7 +90,7 @@ typedef NS_OPTIONS(NSUInteger, ASHierarchyState) * In order to guarantee against deadlocks, this method should only be called on the main thread. * It may block on the private queue, [_ASDisplayLayer displayQueue] */ -- (void)recursivelyEnsureDisplay; +- (void)recursivelyEnsureDisplaySynchronously:(BOOL)synchronously; /** * @abstract Allows a node to bypass all ensureDisplay passes. Defaults to NO.