[ASRangeController] Inspect delegate's ASInterfaceState to delay preloading beyond viewport until visible.

This commit is contained in:
Scott Goodson
2016-01-03 19:14:07 -08:00
parent 95bd2c264c
commit 984fe43997
10 changed files with 181 additions and 49 deletions

View File

@@ -132,20 +132,12 @@ typedef NS_OPTIONS(NSUInteger, ASDisplayNodeMethodOverrides)
- (void)__layout;
- (void)__setSupernode:(ASDisplayNode *)supernode;
// Changed before calling willEnterHierarchy / didExitHierarchy.
@property (nonatomic, readwrite, assign, getter = isInHierarchy) BOOL inHierarchy;
// Private API for helper functions / unit tests. Use ASDisplayNodeDisableHierarchyNotifications() to control this.
- (BOOL)__visibilityNotificationsDisabled;
- (BOOL)__selfOrParentHasVisibilityNotificationsDisabled;
- (void)__incrementVisibilityNotificationsDisabled;
- (void)__decrementVisibilityNotificationsDisabled;
// Call willEnterHierarchy if necessary and set inHierarchy = YES if visibility notifications are enabled on all of its parents
- (void)__enterHierarchy;
// Call didExitHierarchy if necessary and set inHierarchy = NO if visibility notifications are enabled on all of its parents
- (void)__exitHierarchy;
// Helper method to summarize whether or not the node run through the display process
- (BOOL)__implementsDisplay;