ASDisplayNode.mm
_locked_layoutPlaceholderIfNecessary
1
2
3
4
5
6
7
8
9
- (void)_locked_layoutPlaceholderIfNecessary
{
ASAssertLocked(__instanceLock__);
if ([self _locked_shouldHavePlaceholderLayer]) {
[self _locked_setupPlaceholderLayerIfNeeded];
}
// Update the placeholderLayer size in case the node size has changed since the placeholder was added.
_placeholderLayer.frame = self.threadSafeBounds;
}
placeholderImage
1
2
3
4
5
- (UIImage *)placeholderImage
{
// Subclass hook
return nil;
}
placeholderShouldPersist
1
2
3
4
5
- (BOOL)placeholderShouldPersist
{
// Subclass hook
return NO;
}