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:
Ryan Nystrom
2014-12-03 10:17:48 -08:00
parent 8b303710b6
commit d27c8859c7
33 changed files with 1140 additions and 2 deletions

View File

@@ -69,6 +69,18 @@ typedef NS_ENUM(NSUInteger, ASTextNodeHighlightStyle) {
*/
@property (nonatomic, readonly, assign) NSUInteger lineCount;
#pragma mark - Placeholders
/**
@abstract The placeholder color.
*/
@property (nonatomic, strong) UIColor *placeholderColor;
/**
@abstract Inset each line of the placeholder.
*/
@property (nonatomic, assign) UIEdgeInsets placeholderInsets;
#pragma mark - Shadow
/**