Created
May 3, 2020 10:21
-
-
Save michzio/cd9d4edae34643a07d969e44d81f4d2e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension CollectionView { | |
private func snapshotForCurrentState() -> NSDiffableDataSourceSnapshot<Section, Item> { | |
var snapshot = NSDiffableDataSourceSnapshot<Section, Item>() | |
snapshot.appendSections(sections) | |
for section in sections { | |
snapshot.appendItems(items[section]!, toSection: section) | |
} | |
return snapshot | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment