Skip to content

Instantly share code, notes, and snippets.

@KrauserHuang
Created March 31, 2022 04:05
Show Gist options
  • Select an option

  • Save KrauserHuang/4ffd5daca537e9d7950906ef833febd5 to your computer and use it in GitHub Desktop.

Select an option

Save KrauserHuang/4ffd5daca537e9d7950906ef833febd5 to your computer and use it in GitHub Desktop.
func configureDataSource() -> DataSoure {
let dataSource = DataSource(collectionView: collectionView) { collectionView, indexPath, video -> UICollectionViewCell? in
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "VideoCollectionViewCell", for: indexPath) as? VideoCollectionViewCell
cell?.video = video
return cell
}
return dataSource
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment