Skip to content

Instantly share code, notes, and snippets.

@EricADockery
Created June 16, 2018 12:57
Show Gist options
  • Save EricADockery/4327a1094d6c161ea0ccdbff7a7fb164 to your computer and use it in GitHub Desktop.
Save EricADockery/4327a1094d6c161ea0ccdbff7a7fb164 to your computer and use it in GitHub Desktop.
class ViewController: UIViewController {
}
extension ViewController: UICollectionViewDelegate {
}
extension ViewController: UICollectionViewDataSource {
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return 1
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "ImageCollectionViewCell", for: indexPath) as! ImageCollectionViewCell
cell.imageView.overlayContentView.addSubview(cell.gradientView)
return cell
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment