UICollectionView calculates contentSize wrong with self-sizing cells

Number:rdar://18078598 Date Originated:2014-08-20
Status:Open Resolved:
Product:UIKit Product Version:iOS8beta6
Classification:Bug Reproducible:always
Using iOS8's self-sizing cells, UICollectionView calculates the size of the cells based on their auto layout constraints. But, as this example shows, it fails to use those numbers to calculate the overall collectionViewContentSize correctly.

This has the effect that some of the collection view's items are laid out beyond the scrollable region of the collection view.

Steps to Reproduce:
1. Run the enclosed app, which reproduces the redoubtable Olivier Gutknecht's demo in WWDC 2014, session 226.
2. Scroll to the bottom of the collection view.

Expected Results:

3. I expected to the see that last collection view item laid out with the others.

Actual Results:
3. Notice that you cannot see the multiline label, which is the last item in the collection view 


This included example project includes discussion in the comments in ViewController.swift, and a short video showing the problem in Simulator.app

iPhone 5

'SelfSizingCellsDemo.zip' was successfully uploaded.

Attachment available at:


Still happen on iOS 12. Any update on this?

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!