This repository has been archived by the owner on Nov 24, 2021. It is now read-only.
DATASource — 6.1.1
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
}
}