changed '-visibilityDidChange:' to '-visiblieStateDidChange:' to match the others

This commit is contained in:
Luke Parham 2016-05-04 16:41:11 -05:00
parent d47059dffe
commit e510120031
11 changed files with 20 additions and 20 deletions

View File

@ -214,9 +214,9 @@
// To be overriden by subclasses // To be overriden by subclasses
} }
- (void)visibilityDidChange:(BOOL)isVisible - (void)visibileStateDidChange:(BOOL)isVisible
{ {
[super visibilityDidChange:isVisible]; [super visibileStateDidChange:isVisible];
CGRect cellFrame = CGRectZero; CGRect cellFrame = CGRectZero;
if (_scrollView) { if (_scrollView) {

View File

@ -173,9 +173,9 @@
} }
#if ASRangeControllerLoggingEnabled #if ASRangeControllerLoggingEnabled
- (void)visibilityDidChange:(BOOL)isVisible - (void)visibileStateDidChange:(BOOL)isVisible
{ {
[super visibilityDidChange:isVisible]; [super visibileStateDidChange:isVisible];
NSLog(@"%@ - visible: %d", self, isVisible); NSLog(@"%@ - visible: %d", self, isVisible);
} }
#endif #endif

View File

@ -240,7 +240,7 @@ NS_ASSUME_NONNULL_BEGIN
* *
* @discussion Subclasses may use this to monitor when they become visible. * @discussion Subclasses may use this to monitor when they become visible.
*/ */
- (void)visibilityDidChange:(BOOL)isVisible ASDISPLAYNODE_REQUIRES_SUPER; - (void)visibileStateDidChange:(BOOL)isVisible ASDISPLAYNODE_REQUIRES_SUPER;
/** /**
* @abstract Called whenever the the node has entered or left the display state. * @abstract Called whenever the the node has entered or left the display state.

View File

@ -2106,7 +2106,7 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock)
if (![self supportsRangeManagedInterfaceState]) { if (![self supportsRangeManagedInterfaceState]) {
self.interfaceState = ASInterfaceStateNone; self.interfaceState = ASInterfaceStateNone;
} else { } else {
// This case is important when tearing down hierarchies. We must deliver a visibilityDidChange:NO callback, as part our API guarantee that this method can be used for // This case is important when tearing down hierarchies. We must deliver a visibileStateDidChange:NO callback, as part our API guarantee that this method can be used for
// things like data analytics about user content viewing. We cannot call the method in the dealloc as any incidental retain operations in client code would fail. // things like data analytics about user content viewing. We cannot call the method in the dealloc as any incidental retain operations in client code would fail.
// Additionally, it may be that a Standard UIView which is containing us is moving between hierarchies, and we should not send the call if we will be re-added in the // Additionally, it may be that a Standard UIView which is containing us is moving between hierarchies, and we should not send the call if we will be re-added in the
// same runloop. Strategy: strong reference (might be the last!), wait one runloop, and confirm we are still outside the hierarchy (both layer-backed and view-backed). // same runloop. Strategy: strong reference (might be the last!), wait one runloop, and confirm we are still outside the hierarchy (both layer-backed and view-backed).
@ -2173,7 +2173,7 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock)
}); });
} }
- (void)visibilityDidChange:(BOOL)isVisible - (void)visibileStateDidChange:(BOOL)isVisible
{ {
// subclass override // subclass override
} }
@ -2295,7 +2295,7 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock)
BOOL wasVisible = ASInterfaceStateIncludesVisible(oldState); BOOL wasVisible = ASInterfaceStateIncludesVisible(oldState);
if (nowVisible != wasVisible) { if (nowVisible != wasVisible) {
[self visibilityDidChange:nowVisible]; [self visibileStateDidChange:nowVisible];
} }
[self interfaceStateDidChange:newState fromState:oldState]; [self interfaceStateDidChange:newState fromState:oldState];

View File

@ -135,9 +135,9 @@
[self.animatedImage clearAnimatedImageCache]; [self.animatedImage clearAnimatedImageCache];
} }
- (void)visibilityDidChange:(BOOL)isVisible - (void)visibileStateDidChange:(BOOL)isVisible
{ {
[super visibilityDidChange:isVisible]; [super visibileStateDidChange:isVisible];
ASDisplayNodeAssertMainThread(); ASDisplayNodeAssertMainThread();
if (isVisible) { if (isVisible) {

View File

@ -297,9 +297,9 @@ typedef void(^ASMultiplexImageLoadCompletionBlock)(UIImage *image, id imageIdent
/* visibilityDidChange in ASNetworkImageNode has a very similar implementation. Changes here are likely necessary /* visibilityDidChange in ASNetworkImageNode has a very similar implementation. Changes here are likely necessary
in ASNetworkImageNode as well. */ in ASNetworkImageNode as well. */
- (void)visibilityDidChange:(BOOL)isVisible - (void)visibileStateDidChange:(BOOL)isVisible
{ {
[super visibilityDidChange:isVisible]; [super visibileStateDidChange:isVisible];
if (_downloaderImplementsSetPriority) { if (_downloaderImplementsSetPriority) {
ASDN::MutexLocker l(_downloadIdentifierLock); ASDN::MutexLocker l(_downloadIdentifierLock);

View File

@ -280,9 +280,9 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0};
/* visibilityDidChange in ASMultiplexImageNode has a very similar implementation. Changes here are likely necessary /* visibilityDidChange in ASMultiplexImageNode has a very similar implementation. Changes here are likely necessary
in ASMultiplexImageNode as well. */ in ASMultiplexImageNode as well. */
- (void)visibilityDidChange:(BOOL)isVisible - (void)visibileStateDidChange:(BOOL)isVisible
{ {
[super visibilityDidChange:isVisible]; [super visibileStateDidChange:isVisible];
if (_downloaderImplementsSetPriority) { if (_downloaderImplementsSetPriority) {
_lock.lock(); _lock.lock();

View File

@ -145,9 +145,9 @@
} }
#if ASRangeControllerLoggingEnabled #if ASRangeControllerLoggingEnabled
- (void)visibilityDidChange:(BOOL)isVisible - (void)visibileStateDidChange:(BOOL)isVisible
{ {
[super visibilityDidChange:isVisible]; [super visibileStateDidChange:isVisible];
NSLog(@"%@ - visible: %d", self, isVisible); NSLog(@"%@ - visible: %d", self, isVisible);
} }
#endif #endif

View File

@ -382,9 +382,9 @@ static NSString * const kStatus = @"status";
} }
} }
- (void)visibilityDidChange:(BOOL)isVisible - (void)visibileStateDidChange:(BOOL)isVisible
{ {
[super visibilityDidChange:isVisible]; [super visibileStateDidChange:isVisible];
ASDN::MutexLocker l(_videoLock); ASDN::MutexLocker l(_videoLock);

View File

@ -95,7 +95,7 @@ static UIApplicationState __ApplicationState = UIApplicationStateActive;
{ {
_scrollDirection = scrollDirection; _scrollDirection = scrollDirection;
// Perform update immediately, so that cells receive a visibilityDidChange: call before their first pixel is visible. // Perform update immediately, so that cells receive a visibileStateDidChange: call before their first pixel is visible.
[self scheduleRangeUpdate]; [self scheduleRangeUpdate];
} }

View File

@ -223,7 +223,7 @@
}]; }];
_videoNode.playerNode.layer.frame = CGRectZero; _videoNode.playerNode.layer.frame = CGRectZero;
[_videoNode visibilityDidChange:YES]; [_videoNode visibileStateDidChange:YES];
XCTAssertTrue(_videoNode.shouldBePlaying); XCTAssertTrue(_videoNode.shouldBePlaying);
} }