[ASVideoNode] Change superclass to ASNetworkImageNode so that it can be its own placeholder (#1710)

* [ASVideoNode] Change superclass to ASNetworkImageNode so that ASVideoNode can be its own placeholder
- remove _placeholderImageNode property of ASVideoNode (use self.image now instead)
- move layoutSpecThatFits: code to calculateSizeThatFits: & layout: methods as ASImageNode uses calculateSizeThatFits:

* [ASVideoNode] Tweaks to the definition of the delegate protocols to integrate with ASNetworkImageNode (superclass)
This commit is contained in:
Hannah Troisi
2016-06-05 18:18:52 -07:00
committed by appleguy
parent 4804f429b9
commit 52d58992da
4 changed files with 46 additions and 67 deletions

View File

@@ -45,7 +45,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* The delegate, which must conform to the <ASNetworkImageNodeDelegate> protocol.
*/
@property (atomic, weak, readwrite) id<ASNetworkImageNodeDelegate> delegate;
@property (nullable, atomic, weak, readwrite) id<ASNetworkImageNodeDelegate> delegate;
/**
* A placeholder image to display while the URL is loading.
@@ -100,6 +100,7 @@ NS_ASSUME_NONNULL_BEGIN
* notifications such as finished decoding and downloading an image.
*/
@protocol ASNetworkImageNodeDelegate <NSObject>
@optional
/**
* Notification that the image node finished downloading an image.
@@ -111,8 +112,6 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (void)imageNode:(ASNetworkImageNode *)imageNode didLoadImage:(UIImage *)image;
@optional
/**
* Notification that the image node started to load
*