2611 rename fetch data (#2689)

* Replace fetch data with preload terminology
- Deprecate `-fetchData` and `-clearFetchedData` in favor of `-preload` and `-clearPreloadedData`
- Move `-setNeedsPreload`, `-recursivelyPreload` and `-recursivelyClearPreloadedData` to ASDisplayNode+FrameworkPrivate.h
- Update internal implementation, comments and tests

* Folllow up on #2642:
- Remove -preload and -clearPreloadedData in favor of -didEnterPreloadState and -didExitPreloadState.
- -didEnterPreloadState and -didExitPreloadState call the deprecated -fetchData and -clearFetchedData methods if they are overriden.

* Missed one in a test

* Get rid of behavior change for now.

* Revert more behavior changes, fix tests.

* Don't need these anymore.
This commit is contained in:
Garrett Moon
2016-12-01 13:41:22 -08:00
committed by Hannah Troisi
parent c7ea15a5e4
commit ba2268ac99
20 changed files with 151 additions and 167 deletions

View File

@@ -478,31 +478,6 @@ extern NSInteger const ASDefaultDrawingPriority;
*/
- (void)recursivelyClearContents;
/**
* @abstract Calls -clearFetchedData on the receiver and its subnode hierarchy.
*
* @discussion Clears any memory-intensive fetched content.
* This method is used to notify the node that it should purge any content that is both expensive to fetch and to
* retain in memory.
*
* @see [ASDisplayNode(Subclassing) clearFetchedData] and [ASDisplayNode(Subclassing) fetchData]
*/
- (void)recursivelyClearFetchedData;
/**
* @abstract Calls -fetchData on the receiver and its subnode hierarchy.
*
* @discussion Fetches content from remote sources for the current node and all subnodes.
*
* @see [ASDisplayNode(Subclassing) fetchData] and [ASDisplayNode(Subclassing) clearFetchedData]
*/
- (void)recursivelyFetchData;
/**
* @abstract Triggers a recursive call to fetchData when the node has an interfaceState of ASInterfaceStatePreload
*/
- (void)setNeedsDataFetch;
/**
* @abstract Toggle displaying a placeholder over the node that covers content until the node and all subnodes are
* displayed.