diff --git a/Source/IGListCollectionViewLayout.mm b/Source/IGListCollectionViewLayout.mm index ebb50643..cf4f3523 100644 --- a/Source/IGListCollectionViewLayout.mm +++ b/Source/IGListCollectionViewLayout.mm @@ -492,11 +492,14 @@ static void adjustZIndexForAttributes(UICollectionViewLayoutAttributes *attribut const CGSize size = [delegate collectionView:collectionView layout:self sizeForItemAtIndexPath:indexPath]; IGAssert(CGSizeGetLengthInDirection(size, fixedDirection) <= paddedLengthInFixedDirection - || fabs(CGSizeGetLengthInDirection(size, fixedDirection) - paddedLengthInFixedDirection) < FLT_EPSILON, - @"%@ of item %zi in section %zi must be less than container %.0f accounting for section insets %@", - self.scrollDirection == UICollectionViewScrollDirectionVertical ? @"Width" : @"Height", - item, section, CGRectGetLengthInDirection(contentInsetAdjustedCollectionViewBounds, fixedDirection), - NSStringFromUIEdgeInsets(insets)); + || fabs(CGSizeGetLengthInDirection(size, fixedDirection) - paddedLengthInFixedDirection) < FLT_EPSILON, + @"%@ of item %zi in section %zi (%.0f pt) must be less than or equal to container (%.0f pt) accounting for section insets %@", + self.scrollDirection == UICollectionViewScrollDirectionVertical ? @"Width" : @"Height", + item, + section, + CGSizeGetLengthInDirection(size, fixedDirection), + CGRectGetLengthInDirection(contentInsetAdjustedCollectionViewBounds, fixedDirection), + NSStringFromUIEdgeInsets(insets)); CGFloat itemLengthInFixedDirection = MIN(CGSizeGetLengthInDirection(size, fixedDirection), paddedLengthInFixedDirection);