Skip to content

Commit

Permalink
Fix for Infinite loop. Rightpoint#20
Browse files Browse the repository at this point in the history
Rightpoint#20.

Instead of calling layoutIfNeeded, call setNeedsLayout, this stops the
infinite loop if UIViewShowAlignmentRects is turned on.
  • Loading branch information
git-kaylanx committed Aug 16, 2014
1 parent a6d77fe commit 1867d64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion RZCellSizeManager/RZCellSizeManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ - (NSNumber *)cellHeightForObject:(id)object configuration:(RZCellSizeManagerCel
{
[configuration.cell prepareForReuse];
configuration.configurationBlock(configuration.cell, object);
[configuration.cell layoutIfNeeded];
[configuration.cell setNeedsLayout];
UIView* contentView = [configuration.cell contentView];
height = @([contentView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize].height + self.cellHeightPadding);
}
Expand Down

0 comments on commit 1867d64

Please sign in to comment.