Need -[UICollectionViewDelegate collectionView:willDisplayCell:forItemAtIndexPath:]

Originator:futuretap
Number:rdar://16070938 Date Originated:14-Feb-2014 06:55 PM
Status:Open Resolved:
Product:iOS SDK Product Version:7.0
Classification:Enhancement Reproducible:Not Applicable
 
Analogous to UITableView, I'd like to be separately informed when a cell is displayed on screen. This would be useful for lazy loading of content, for animations and various other purposes.

The data source method –collectionView:cellForItemAtIndexPath: doesn't really solve that purpose since it's (probably depending on the layout) called much earlier and for cells that might never be displayed in the visible area.

Also, there's -collectionView:didEndDisplayingCell:forItemAtIndexPath: but not the inverse callback. So also for symmetry reasons it would make sense to add this method.

Comments

Needed

Yes, this is needed to be correctly notified when a cell will display for lazy loading content, configuring cell appearance, and many other use cases.


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!