Suggestion for sample: Using Collection View Compositional Layouts and Diffable Data Sources

Originator:indiekiduk
Number:rdar://FB7716030 Date Originated:27/5/20
Status:Open Resolved:No
Product:Code Sample Product Version:2020-04-29
Classification:Suggesting Reproducible:
 
Basic information
Please provide a descriptive title for your feedback:
Suggestion for sample: Using Collection View Compositional Layouts and Diffable Data Sources
Which area are you seeing an issue with?
Sample Code
What type of feedback are you reporting?
Suggestion
Description
Please describe the issue:
In the "Using Collection View Compositional Layouts and Diffable Data Sources" sample at:
https://developer.apple.com/documentation/uikit/views_and_controls/collection_views/using_collection_view_compositional_layouts_and_diffable_data_sources
Date of files in downloaded zip: 2020-04-29

Inside Diffable/TableViewEditingViewController.swift

I'd like to suggest that jn the moveRowAt line 56 and the commit line 90 these should be working on the model data, i.e. make changes to the model array, then get a snapshot of that and apply it to the table. Not taking a snapshot of the current state of the table modifying it and applying.

Also TableViewEditingViewController: UIViewController could be a subclass of UITableViewController to get all of its features.

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!