* [ASNetworkImageNode] Assert if both URL and image are set
Here's one other idea for addressing this problem. Essentially,
we assert if you've set both the URL and the image. I've played around
with Pinterest and there's only one case where we hit this (the transition).
So I've also added another method (which is a bummer, it's weird I know)
but there's one good reason to add this method, ephemeralImage, which is
the user doesn't have to manually clear it out like they would if they
used defaultImage to save memory.
Putting this up for discussion.
* Fix comment
* Oh yeah, @dynamic, thanks @adlai
* Remove ephemeralImage
After much discussion I think this is the correct behavior. It seems
like it's much more likely to be the expected behavior but still enables
you to use the network image node like an regular image node.
* [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 should not directly affect more complex apps that don't use the ASBasicImageDownloader.
Also disables the default-on text placeholders, as they churn memory during the measurement pass.
These were intended to be written with pure layers (without using backing stores), so I don't
think it is a reasonable default-on behavior until that is fixed.
Use ASBasicImageDownloader by default -- you can now do...
ASNetworkImageNode *imageNode = [[ASNetworkImageNode alloc] init];
imageNode.URL = [NSURL URLWithString:@"..."];
[self.view addSubview:imageNode.view];
...and it'll do the right thing.