Skip to content

Commit

Permalink
Remove assertion in calculateSizeThatFits: and add a log event (Textu…
Browse files Browse the repository at this point in the history
  • Loading branch information
maicki authored and bernieperez committed Apr 25, 2018
1 parent 13fded4 commit 9292f5a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Source/ASDisplayNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1049,11 +1049,7 @@ - (CGSize)calculateSizeThatFits:(CGSize)constrainedSize
{
__ASDisplayNodeCheckForLayoutMethodOverrides;

#if ASDISPLAYNODE_ASSERTIONS_ENABLED
if (ASIsCGSizeValidForSize(constrainedSize) == NO) {
NSLog(@"Cannot calculate size of node: constrainedSize is infinite and node does not override -calculateSizeThatFits: or specify a preferredSize. Try setting style.preferredSize. Node: %@", [self displayNodeRecursiveDescription]);
}
#endif
ASDisplayNodeLogEvent(self, @"calculateSizeThatFits: with constrainedSize: %@", NSStringFromCGSize(constrainedSize));

return ASIsCGSizeValidForSize(constrainedSize) ? constrainedSize : CGSizeZero;
}
Expand Down

0 comments on commit 9292f5a

Please sign in to comment.