UICollectionViewCell Height Bug

UICollectionView is not the newest Apple stuff. But this bug is really annoying. First I expected it’s something wrong with my code. But after isolating the issue, it became clear, that it is a nasty UIKit bug.

demo

This demo project on github demonstrates the UICollectionViewCell’s height bug when the dataSource (controller) returns a zero height for the 1st sections 1st row cell. The bug occurs with the following setup:

  • the UICollectionsView has 2 sections
  • The 1st section has one row
  • This row has a zero height for the cell
  • Result => the following UICollectionView cells (in bounds) are NOT visible, but the collectionView can be scrolled, looks like that the cells are hidden
  • I filed a bug report: rdar://18120029

Yes, I filed a bug report. As often: No response.

Leave a Reply

Your email address will not be published. Required fields are marked *