mirror of
https://github.com/HackPlan/AsyncDisplayKit.git
synced 2026-03-28 23:58:50 +08:00
Ensure that er use the correct default size for collection nodes even if layoutSubviews has not been called yet
This commit is contained in:
@@ -780,6 +780,11 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell";
|
||||
if (_asyncDataSourceImplementsConstrainedSizeForNode) {
|
||||
constrainedSize = [_asyncDataSource collectionView:self constrainedSizeForNodeAtIndexPath:indexPath];
|
||||
} else {
|
||||
if (! CGSizeEqualToSize(_maxSizeForNodesConstrainedSize, self.bounds.size)) {
|
||||
_maxSizeForNodesConstrainedSize = self.bounds.size;
|
||||
_ignoreMaxSizeChange = CGSizeEqualToSize(_maxSizeForNodesConstrainedSize, CGSizeZero);
|
||||
}
|
||||
|
||||
CGSize maxSize = _maxSizeForNodesConstrainedSize;
|
||||
if (ASScrollDirectionContainsHorizontalDirection([self scrollableDirections])) {
|
||||
maxSize.width = FLT_MAX;
|
||||
|
||||
Reference in New Issue
Block a user