ra1028 / DiffableDataSources

💾 A library for backporting UITableView/UICollectionViewDiffableDataSource.
https://ra1028.github.io/DiffableDataSources
Apache License 2.0
849 stars 68 forks source link

Make `DiffableDataSourceSnapshot` struct #3

Closed kishikawakatsumi closed 5 years ago

kishikawakatsumi commented 5 years ago

In the latest Xcode 11 (beta 6), DiffableDataSourceSnapshot class changed to a struct. This PR adopt the API to the latest UIKit's API.

Checklist

Description

Motivation and Context

If we can write let snapshot as before, we can't copy and paste as it is when we migrate to the iOS 13 standard API in the future. Because of let snapshot almost causes compilation error on in Cocoa's API.

Impact on Existing Code

In most cases let snapshot is now a compilation error. Users should rewrite it to var snapshot.

ra1028 commented 5 years ago

Great catch up @kishikawakatsumi ! Thanks 👍