Hi,
When I'm using ASNetworkImageNode the placeholder is not working as we expected.
In the Placeholder sample which is included in the repo, the logo image is set to imageNode right after node is initialized. The placeholder is working just fine.
// ASImageNode gets placeholders by default
_imageNode = [[SlowpokeImageNode alloc] init];
_imageNode.image = [UIImage imageNamed:@"logo"];
But if I delay setting the image by several seconds(5 seconds for example) as follows:
// ASImageNode gets placeholders by default
_imageNode = [[SlowpokeImageNode alloc] init];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
_imageNode.image = [UIImage imageNamed:@"logo"];
});
The placeholderlayer will fadeout at start, then removed from superlayer, and when setting image on 5 seconds later, the placeholderlayer is added to node layer again, fadeout, and removed from superlayer:

After some research on the source code, I found that the placeholderlayer is added to node on each displayWillStart, and fadeout on each displayDidFinished().
As a result in ASNetworkImageNode, the placeholder is fading out twice(once on initial display, and another on image downloaded). Is this the expected behavior or am I missing anything? How can I prevent the first fade out from happening, since the network image hasn't finished downloading yet?