Setting estimatedItemSize on UICollectionViewFlowLayout breaks UICollectionViewDataSourcePrefetching

Originator:elitecoder.mukul
Number:rdar://47325370 Date Originated:1/16/2019
Status: Resolved:
Product:iOS + SDK UIKit Product Version:iOS 12.1
Classification: Reproducible:Always
 
Area:
UIKit

Summary:
Creating a UICollectionView with cells of dynamic height and using estimatedItemSize property on UICollectionViewFlowLayout.

Although, once I set the estimatedItemSize property, my prefetchItemsAt method for UICollectionViewDataSourcePrefetching delegate is not getting called.

If I don't set estimatedItemSize, prefetching starts working again.

Steps to Reproduce:
Set UICollectionViewFlowLayout.estimatedItemSize property with any value.
Observe UICollectionViewDataSourcePrefetching delegate methods not getting called.

Expected Results:

UICollectionViewDataSourcePrefetching delegate methods should be called.
Actual Results:


Version/Build:
iOS 12.1

Configuration:
Xcode Version 10.1 (10B61) - iPhone 6 Simulator (12.1)

Comments


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!