Functioning Preload range

Refactor how we do ranges so they can be arbitrarily managed. Introduce the concept of a preload range.
This commit is contained in:
Ryan Nystrom
2015-02-02 18:23:45 -08:00
parent 9c877c51af
commit 4fa03a01d1
27 changed files with 477 additions and 222 deletions

View File

@@ -162,9 +162,9 @@ typedef void(^ASMultiplexImageLoadCompletionBlock)(UIImage *image, id imageIdent
}
#pragma mark - ASDisplayNode Overrides
- (void)reclaimMemory
- (void)clearRendering
{
[super reclaimMemory]; // This actually clears the contents, so we need to do this first for our displayedImageIdentifier to be meaningful.
[super clearRendering]; // This actually clears the contents, so we need to do this first for our displayedImageIdentifier to be meaningful.
[self _setDisplayedImageIdentifier:nil withImage:nil];
if (_downloadIdentifier) {
@@ -177,6 +177,13 @@ typedef void(^ASMultiplexImageLoadCompletionBlock)(UIImage *image, id imageIdent
{
[super displayWillStart];
[self fetchRemoteData];
}
- (void)fetchRemoteData
{
[super fetchRemoteData];
[self _loadImageIdentifiers];
}