[ASDisplayNode] Placeholders should always be recreated if returning to past nodes.

If previously-displayed contents is gone (e.g. clearContents), and is not finished displaying
by the time the node is onscreen, recreate the placeholder immediately.
This commit is contained in:
Scott Goodson
2016-03-18 21:13:26 -07:00
parent 0745eabec9
commit c5c7abb1d6
5 changed files with 126 additions and 93 deletions

View File

@@ -91,4 +91,11 @@ ASDISPLAYNODE_EXTERN_C_END
shouldMeasureAsync:(BOOL)shouldMeasureAsync
measurementCompletion:(void(^)())completion;
/**
* @abstract Currently used by ASNetworkImageNode and ASMultiplexImageNode to allow their placeholders to stay if they are loading an image from the network.
* Otherwise, a display pass is scheduled and completes, but does not actually draw anything - and ASDisplayNode considers the element finished.
*/
- (BOOL)placeholderShouldPersist;
@end