Kurdtvs-Live-Kurdish-TV-Kur.../Mastodon/Diffiable/Search/RecommendHashTagSection.swift

27 lines
852 B
Swift
Raw Normal View History

2021-04-01 14:54:57 +02:00
//
2021-04-06 09:25:04 +02:00
// RecommendHashTagSection.swift
2021-04-01 14:54:57 +02:00
// Mastodon
//
// Created by sxiaojian on 2021/4/1.
//
import Foundation
import MastodonSDK
import UIKit
2021-04-06 09:25:04 +02:00
enum RecommendHashTagSection: Equatable, Hashable {
2021-04-01 14:54:57 +02:00
case main
}
2021-04-06 09:25:04 +02:00
extension RecommendHashTagSection {
2021-04-01 14:54:57 +02:00
static func collectionViewDiffableDataSource(
for collectionView: UICollectionView
2021-04-06 09:25:04 +02:00
) -> UICollectionViewDiffableDataSource<RecommendHashTagSection, Mastodon.Entity.Tag> {
2021-04-01 14:54:57 +02:00
UICollectionViewDiffableDataSource(collectionView: collectionView) { collectionView, indexPath, tag -> UICollectionViewCell? in
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: String(describing: SearchRecommendTagsCollectionViewCell.self), for: indexPath) as! SearchRecommendTagsCollectionViewCell
cell.config(with: tag)
return cell
}
}
}