Fix unusual cell content blanking issue when making existing cells much taller.

This commit is contained in:
Scott Goodson
2015-11-07 23:08:53 -08:00
parent ec7aa1c3aa
commit e0f40d5644
3 changed files with 6 additions and 12 deletions

View File

@@ -646,7 +646,6 @@ typedef void (^ASDisplayNodeDidLoadBlock)(ASDisplayNode *node);
* @param node The node to be added.
*/
- (void)addSubnode:(ASDisplayNode *)node;
- (NSString *)name;
@end
/** CALayer(AsyncDisplayKit) defines convenience method for adding sub-ASDisplayNode to a CALayer. */
@@ -657,7 +656,6 @@ typedef void (^ASDisplayNodeDidLoadBlock)(ASDisplayNode *node);
* @param node The node to be added.
*/
- (void)addSubnode:(ASDisplayNode *)node;
- (NSString *)name;
@end
@interface ASDisplayNode (Deprecated)

View File

@@ -2190,11 +2190,6 @@ static const char *ASDisplayNodeAssociatedNodeKey = "ASAssociatedNode";
}
}
- (NSString *)name
{
return self.asyncdisplaykit_node.name;
}
@end
@implementation CALayer (AsyncDisplayKit)
@@ -2204,11 +2199,6 @@ static const char *ASDisplayNodeAssociatedNodeKey = "ASAssociatedNode";
[self addSublayer:node.layer];
}
- (NSString *)name
{
return self.asyncdisplaykit_node.name;
}
@end

View File

@@ -37,6 +37,12 @@
ASDisplayNodeAssertMainThread();
ASDisplayNodeAssert(rangeType == ASLayoutRangeTypeRender, @"Render delegate should not handle other ranges");
// If a node had previously been onscreen but now is only in the working range,
// ensure its view is not orphaned in a UITableViewCell in the reuse pool.
if (![node isLayerBacked] && node.view.superview) {
[node.view removeFromSuperview];
}
[node recursivelySetDisplaySuspended:NO];
// Add the node's layer to an off-screen window to trigger display and mark its contents as non-volatile.