UICollectionView doesn't query layout for attributes after invalidation

Originator:tzaworowski
Number:rdar://26981375 Date Originated:23-Jun-2016 01:49 PM
Status:Open Resolved:
Product:iOS SDK Product Version:iOS 10.0 (14A5261u)
Classification: Reproducible:Always
 
Summary:
Collection view doesn't query the layout for new attributes after returning invalidation context from `invalidationContextForPreferredLayoutAttributes:`

Steps to Reproduce:
1. Open SelfSizingLayoutDemo and select iPhone 5s (9.3) from device menu.
2. Build and run.
3. Scroll through the collection view.
4. Stop execution and select iPhone 5s (10.0) from device menu.
5. Build and run.
6. Observe the incorrect cell size right after collection view appears on screen.
7. Flick to scroll through the collection view and observe some cells resizing mid scroll.

Expected Results:
The collection view works as expected on iOS 9.3 but not on iOS 10.0. Specifically, the collection view doesn't query the layout for new attributes after returning invalidation context from `invalidationContextForPreferredLayoutAttributes:`.

Actual Results:
The collection view should behave as it did in iOS 9.3. It should query the layout for new attributes after receiving invalidation context from `invalidationContextForPreferredLayoutAttributes`.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!