How to resolve slow scrolling issue in UICollectionView?

Scrolling a collection view with a large number of supplementary header views is extremely slow. The more sections, the worst is the scrolling performance. (Tested with 5,000 sections).

Best to give it a try and see for yourself.

Code is available at https://github.com/yoasha/CollectionViewTest

To reproduce, run the demo app with Xcode on either iPhone or iPad simulator (or a real device), select "Collection View" on the main page, and try to scroll.

Any thoughts?

  • Note that with UITableView there is no scrolling issue, even with 10,000 rows (the sample project demonstrates that as well)

Add a Comment