UICollectionView section headers do not always pin to visible bounds while scrolling

Number:rdar://29918152 Date Originated:08-Jan-2017 02:04 PM
Status:Open Resolved:
Product:iOS + SDK Product Version:10.2 (14C92)
Classification: Reproducible:Always

Setting UICollectionViewFlowLayout.sectionHeadersPinToVisibleBounds makes section headers pin to visible bounds. Unfortunately, this breaks while fast scrolling and inserting new UICollectionView cells at the same time. See recorded `fast_scroll.mov` and sample project `CollecionViewTestApp.zip` used in that recording. The problem happens more often and is better visible when item cells have a lot of subviews and autolayout constraints.

Steps to Reproduce:
1. Open example project.
2. Run it on iOS device or simulator.
3. Try to scroll really fast.
4. See section header glitches.

Expected Results:
Section header should always stick to visible bounds no matter what.

Actual Results:
Section header sometimes unpins from visible bounds for a while.

10.2 (14C92)


iPhone 6 Plus

'fast_scroll.mov' and 'CollecionViewTestApp.zip' were successfully uploaded.


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!