Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

Commit d006d38

Browse files
committed
Merge branch 'master' into releases/p6.9
2 parents 06580a4 + c797fdf commit d006d38

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

AsyncDisplayKit/Layout/ASDimension.mm

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@
1717

1818
ASRelativeDimension ASRelativeDimensionMake(ASRelativeDimensionType type, CGFloat value)
1919
{
20-
if (type == ASRelativeDimensionTypePoints) { ASDisplayNodeCAssertPositiveReal(@"Points", value); }
20+
if (type == ASRelativeDimensionTypePoints) {
21+
ASDisplayNodeCAssertPositiveReal(@"Points", value);
22+
} else if (type == ASRelativeDimensionTypePercent) {
23+
// TODO: Enable this assertion for 2.0. Check that there is no use case for using a larger value, e.g. to layout for a clipsToBounds = NO element.
24+
// ASDisplayNodeCAssert( 0 <= value && value <= 1.0, @"ASRelativeDimension percent value (%f) must be between 0 and 1.", value);
25+
}
2126
ASRelativeDimension dimension; dimension.type = type; dimension.value = value; return dimension;
2227
}
2328

@@ -28,6 +33,7 @@ ASRelativeDimension ASRelativeDimensionMakeWithPoints(CGFloat points)
2833

2934
ASRelativeDimension ASRelativeDimensionMakeWithPercent(CGFloat percent)
3035
{
36+
// ASDisplayNodeCAssert( 0 <= percent && percent <= 1.0, @"ASRelativeDimension percent value (%f) must be between 0 and 1.", percent);
3137
return ASRelativeDimensionMake(ASRelativeDimensionTypePercent, percent);
3238
}
3339

AsyncDisplayKit/Private/ASEnvironmentInternal.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void ASEnvironmentPerformBlockOnObjectAndChildren(id<ASEnvironment> object, void
4444

4545
block(object);
4646

47-
for (id<ASEnvironment> child in object) {
47+
for (id<ASEnvironment> child in [object children]) {
4848
queue.push(child);
4949
}
5050
}

0 commit comments

Comments
 (0)