Merge pull request #1398 from facebook/Placeholders

[ASDisplayNode] Placeholders should always be recreated if returning to cleared nodes, and remain until ASNetwork/MultiplexImageNode finish loading their image from the network.
This commit is contained in:
appleguy
2016-03-19 21:19:05 -07:00
5 changed files with 126 additions and 93 deletions

View File

@@ -265,6 +265,11 @@ typedef void(^ASMultiplexImageLoadCompletionBlock)(UIImage *image, id imageIdent
}
}
- (BOOL)placeholderShouldPersist
{
return (self.image == nil && self.imageIdentifiers.count > 0);
}
/* displayWillStart in ASNetworkImageNode has a very similar implementation. Changes here are likely necessary
in ASNetworkImageNode as well. */
- (void)displayWillStart