result = overrides ? (NSNumber *)kCFBooleanTrue : (NSNumber *)kCFBooleanFalse;
[cache setObject:result forKey:self];
}
return (result == (NSNumber *)kCFBooleanTrue);
}
- (void)handleVisibilityChange:(BOOL)isVisible
{
if ([self.class requestsVisibilityNotifications] == NO) {
return; // The work below is expensive, and only valuable for subclasses watching visibility events.
}
// NOTE: This assertion is failing in some apps and will be enabled soon.
// ASDisplayNodeAssert(self.isNodeLoaded, @"Node should be loaded in order for it to become visible or invisible. If not in this situation, we shouldn't trigger creating the view.");
UIView *view = self.view;
CGRect cellFrame = CGRectZero;
// Ensure our _scrollView is still valid before converting. It's also possible that we have already been removed from the _scrollView,
// in which case it is not valid to perform a convertRect (this actually crashes on iOS 8).