Skip to content

Instantly share code, notes, and snippets.

@matdziu
Created February 27, 2019 09:46
Show Gist options
  • Select an option

  • Save matdziu/11f82fed9cd3417eed6437346b4b54f4 to your computer and use it in GitHub Desktop.

Select an option

Save matdziu/11f82fed9cd3417eed6437346b4b54f4 to your computer and use it in GitHub Desktop.
extension GamesCollectionViewController: UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return gamesList.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let collectionGameCell = tableView.dequeueReusableCell(withIdentifier: COLLECTION_GAME_CELL_ID, for: indexPath) as! CollectionGameCell
let collectionGame = gamesList[indexPath.row]
collectionGameCell.selectionStyle = UITableViewCell.SelectionStyle.none
collectionGameCell.bind(game: collectionGame)
return collectionGameCell
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment