mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Node placeholder API
ASDisplayNodes now have an overidable method -placeholderImage that lets you provide a custom UIImage to display while a node is displaying asyncronously. The default implementation of this method returns nil and thus does nothing. A provided example project also demonstrates using the placeholder API.
This commit is contained in:
@@ -122,6 +122,15 @@ extern id ASDisplayNodeFindFirstSubnodeOfClass(ASDisplayNode *start, Class c)
|
||||
});
|
||||
}
|
||||
|
||||
#pragma mark - Placeholders
|
||||
|
||||
UIColor *ASDisplayNodeDefaultPlaceholderColor()
|
||||
{
|
||||
return [UIColor colorWithWhite:0.95 alpha:1.0];
|
||||
}
|
||||
|
||||
#pragma mark - Hierarchy Notifications
|
||||
|
||||
void ASDisplayNodeDisableHierarchyNotifications(ASDisplayNode *node)
|
||||
{
|
||||
[node __incrementVisibilityNotificationsDisabled];
|
||||
|
||||
Reference in New Issue
Block a user