1 Reply
      Latest reply on Jan 16, 2020 1:00 PM by Claude31
      clayellis Level 1 Level 1 (0 points)

        When using either UICollectionViewDiffableDataSource or UITableViewDiffableDataSource, what is the "correct/safe" way to get the section identifier from an index path?

         

        snapshot().sectionIdentifiers[indexPath.section]

         

        or

         

        guard let item = itemIdentifier(for: indexPath) else { return }
        snapshot().sectionIdentifier(containingItem: item) 

        ?