I have an ASNetworkImageNode that goes inside of a collection view that has a constrainedSize of (320, 320), but after measuring the log shows that image.calculatedSize is (375, 375). Is there something I'm doing wrong here?
#pragma mark - ASCellNode Delegate
- (CGSize)calculateSizeThatFits:(CGSize)constrainedSize
{
CGSize availableSize = CGSizeMake(constrainedSize.height, constrainedSize.height);
CGSize imageSize = [image measure:availableSize];
NSLog(@"constrainedSize width: %lf and height: %lf", availableSize.width, availableSize.height);
NSLog(@"measured image size width: %lf and height: %lf", imageSize.width, imageSize.height);
return imageSize;
}
- (void)layout
{
CGSize imageSize = image.calculatedSize;
image.frame = CGRectMake(0, 0, imageSize.width, imageSize.height);
}