UICollectionViewCells are not created and use previous cells instead

Originator:rquick
Number:rdar://18244684 Date Originated:05-Sep-2014
Status:Closed Resolved:Yes
Product:iOS SDK Product Version:Xcode Version 5.1.1 (5B1008)
Classification:UI Reproducible:Yes
 
Summary:
I have a UICollectionView that creates cells in order from A through Z, four per row. Y and Z are not off the bottom of the screen and not immediately created. When you scroll down and back up the cells that weren't on the screen after scrolling are no longer in order.

Steps to Reproduce:
1. Create a collection view with more cells than will show on the screen.
2. Subclass the collection view cell and add a label, populated from the main view.
3. Have the collection view use the subclassed cell and populate with the letter from the array.
4. Run the app
5. Scroll down and scroll up.
6. Cells should be in the same order but are not.

Expected Results:
A through X in order on the initial view. The first row is A B C D. After scrolling to the bottom we should have Y and Z in order. After scrolling back up we should have A through X in order. The first row should be A B C D. Scrolling up and down shouldn't rearrange the rows.

Actual Results:
A through X in order on the initial view. The first row is A B C D. After scrolling to the bottom we should have Y and Z in order. After scrolling back up we should have A through X in order. The first row is now out of order. When we scroll down, Y and Z are out of order. Scrolling up and down rearranges the rows again.

Version:
Xcode Version 5.1.1 (5B1008), iOS Simulator Version 7.1 (463.9.41)

Notes:
Added test project that reproduces the issue.

Configuration:
Xcode Version 5.1.1 (5B1008), iOS Simulator Version 7.1 (463.9.41)

Comments

Resolved in iOS 8.0

Tested this in Xcode 6.0.1 (6A317) and iOS simulator 8.0 (550.1) and found it to be working correctly. Marking the issue as resolved. This issue has been verified as resolved and can be closed.


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!