[UICollectionView performBatchUpdates:completion:] docs are contradictory
| Originator: | gene | ||
| Number: | rdar://18921610 | Date Originated: | 2014-11-09 |
| Status: | Open | Resolved: | |
| Product: | Documentation | Product Version: | |
| Classification: | Reproducible: |
Summary: In the docs for [UICollectionView performBatchUpdates:completion:], the order in which deletions and insertions are resolved is explained in a contradictory fashion: "Deletes are processed before inserts in batch operations. This means the indexes for the insertions are processed relative to the indexes of the state before the batch operation, and the indexes for the deletions are processed relative to the indexes of the state after all the insertions in the batch operation." From: https://developer.apple.com/library/ios/documentation/uikit/reference/UICollectionView_class/index.html#//apple_ref/occ/instm/UICollectionView/performBatchUpdates:completion: If Deletes are in fact performed before Inserts, I would expect the second sentence to read: ... indexes for the DELETIONS are processed relative to the indexes of the state before the batch operation, and the indexes for the INSERTIONS are processed relative to the indexes of the state after all the insertions in the batch operation. Steps to Reproduce: N/A Expected Results: To improve this documentation even further, I would suggest explicitly stating the order of all 4 change types (insertions, moves, reloads, and deletes). For example, it is not obvious whether the indexes for reloads are processed relative to the original state before the batch operation, the state subsequent to the insertions, deletions, or both. Actual Results: Version: https://developer.apple.com/library/ios/documentation/uikit/reference/UICollectionView_class/index.html#//apple_ref/occ/instm/UICollectionView/performBatchUpdates:completion: Notes: Configuration: Attachments:
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!