Skip to content

Instantly share code, notes, and snippets.

@stevencurtis
Created July 3, 2020 08:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevencurtis/ab9f612e827476f77bd98883fa730467 to your computer and use it in GitHub Desktop.
Save stevencurtis/ab9f612e827476f77bd98883fa730467 to your computer and use it in GitHub Desktop.
thesnapshot
var snapshot = NSDiffableDataSourceSnapshot<Section, AnyHashable>()
snapshot.appendSections([.appSection, .new, .medium, .features, .links, .buttons, .terms])
snapshot.appendItems(symbols, toSection: .appSection)
snapshot.appendItems(medium, toSection: .medium)
snapshot.appendItems(featured, toSection: .features)
snapshot.appendItems(newupdated, toSection: .new)
snapshot.appendItems(quickLinks, toSection: .links)
snapshot.appendItems(buttons, toSection: .buttons)
snapshot.appendItems(terms, toSection: .terms)
dataSource.apply(snapshot, animatingDifferences: false)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment