This demo project demonstrates the UICollectionView's height bug when returning a zero height for the 1st sections 1st row
Objective-C
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
ColllectionViewHeightBug.xcodeproj
ColllectionViewHeightBug
ColllectionViewHeightBugTests
.gitignore
LICENSE
README.md
demo.png

README.md

UICollectionViewCell Height Bug

This demo project 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

Example

Demo Image

Possible Workaround

Give the 1st section's row a minimum height of 0.1f

How to the see the bug in action?

  • Download demo project
  • Toggle the schemes BUG_OFF, BUG_ON, BUG_Workaround