Skip to content

Recursive loop when implementing cell's preferredLayoutAttributesFittingAttributes: #17

@markst

Description

@markst

Possibly related to #11

If using estimated item sizes:

layout.estimatedItemSize = CGSizeMake(50, 50);

in combination with UICollectionViewCell override of:

- (UICollectionViewLayoutAttributes *)preferredLayoutAttributesFittingAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes {
    CGFloat randomWidth = (arc4random() % 120) + 60;
    layoutAttributes.size = CGSizeMake(randomWidth, 60);
    return layoutAttributes;
}

Application will fall into recursive loop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions