Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AsyncDisplayKit/ASCollectionView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ - (void)collectionView:(UICollectionView *)collectionView willDisplayCell:(UICol

ASCellNode *cellNode = [self nodeForItemAtIndexPath:indexPath];
if (cellNode.neverShowPlaceholders) {
[cellNode recursivelyEnsureDisplay];
[cellNode recursivelyEnsureDisplaySynchronously:YES];
}
}

Expand Down
3 changes: 2 additions & 1 deletion AsyncDisplayKit/ASDisplayNode+Beta.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions AsyncDisplayKit/ASDisplayNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1543,9 +1543,9 @@ - (void)__recursivelyTriggerDisplayAndBlock:(BOOL)shouldBlock
recursivelyTriggerDisplayForLayer(layer, shouldBlock);
}

- (void)recursivelyEnsureDisplay
- (void)recursivelyEnsureDisplaySynchronously:(BOOL)synchronously
{
[self __recursivelyTriggerDisplayAndBlock:YES];
[self __recursivelyTriggerDisplayAndBlock:synchronously];
}

- (void)setShouldBypassEnsureDisplay:(BOOL)shouldBypassEnsureDisplay
Expand Down
2 changes: 1 addition & 1 deletion AsyncDisplayKit/ASTableView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)ce

ASCellNode *cellNode = [self nodeForRowAtIndexPath:indexPath];
if (cellNode.neverShowPlaceholders) {
[cellNode recursivelyEnsureDisplay];
[cellNode recursivelyEnsureDisplaySynchronously:YES];
}
}

Expand Down
2 changes: 1 addition & 1 deletion AsyncDisplayKit/ASViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ - (void)viewDidLayoutSubviews
{
if (_ensureDisplayed && self.neverShowPlaceholders) {
_ensureDisplayed = NO;
[self.node recursivelyEnsureDisplay];
[self.node recursivelyEnsureDisplaySynchronously:YES];
}
[super viewDidLayoutSubviews];
}
Expand Down
2 changes: 1 addition & 1 deletion AsyncDisplayKit/Details/ASRangeHandlerRender.mm
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ - (void)node:(ASDisplayNode *)node enteredRangeOfType:(ASLayoutRangeType)rangeTy


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.
Expand Down
2 changes: 1 addition & 1 deletion AsyncDisplayKit/Private/ASDisplayNode+FrameworkPrivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down