Skip to content

Instantly share code, notes, and snippets.

@orakaro
Last active January 4, 2019 14:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save orakaro/08eda36acdefd030058a8c4baf678a2a to your computer and use it in GitHub Desktop.
Save orakaro/08eda36acdefd030058a8c4baf678a2a to your computer and use it in GitHub Desktop.
override func viewDidLoad() {
super.viewDidLoad()
CollectionViewCell<FeedCellViewController, FeedViewController>.register(to: collectionView)
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let post = posts[indexPath.row]
let cell = CollectionViewCell<FeedCellViewController, FeedViewController>.dequeue(from: collectionView, for: indexPath, parent: parent)
cell.content?.post = post
return cell
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment