Skip to content

Conversation

@crrobinson14
Copy link

XCode 7 / iOS 9 (perhaps earlier?) reports UICollectionViewFlowLayout has cached frame mismatch about the above pattern. Working from a copy resolves the issue.

XCode 7 / iOS 9 (perhaps earlier?) reports `UICollectionViewFlowLayout has cached frame mismatch` about the above pattern. Working from a copy resolves the issue.
@MattCBowman
Copy link
Member

Thanks @crrobinson14! I'll try to get this integrated in the next few days.

@tcheard
Copy link

tcheard commented Feb 17, 2016

Using the copy function on [super layoutAttributesForElementsInRect:rect] only does a shallow copy and still triggers the warning.

See: http://stackoverflow.com/a/33172179/2709382

NSArray* attributesToReturn = [[NSArray alloc] initWithArray:[super layoutAttributesForElementsInRect:rect] copyItems:YES]; is better.

The copy function seems sufficient for [super layoutAttributesForItemAtIndexPath:indexPath]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants