Skip to content
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.

DATASource — 6.1.1

Compare
Choose a tag to compare
@3lvis 3lvis released this 17 Oct 20:23
· 60 commits to master since this release

Fixes an issue with the title in the following delegate call, after the Swift 3 migration it returned an array, not it just returns Any?

extension MyController: DATASourceDelegate {
    func dataSource(_ dataSource: DATASource, collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, atIndexPath indexPath: IndexPath, withTitle title: Any?) -> UICollectionReusableView? {
        let headerView = collectionView.dequeueReusableSupplementaryView(ofKind: UICollectionElementKindSectionHeader, withReuseIdentifier: TimelineHeaderView.identifier, for: indexPath) as! TimelineHeaderView
        if let title = title as? Date {
            headerView.title = self.dateStringForSectionTitle(title)
        }

        return headerView
    }
}