Skip to content

Instantly share code, notes, and snippets.

@damijanracel
Created February 13, 2018 08:40
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 damijanracel/0c4129285d2283aaa3ffe0648bacbf61 to your computer and use it in GitHub Desktop.
Save damijanracel/0c4129285d2283aaa3ffe0648bacbf61 to your computer and use it in GitHub Desktop.
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
guard let cell = tableView.dequeueReusableCell(withIdentifier: "ReusableTableViewCell") as? ReusableTableViewCell, indexPath.row < users.count else {
return UITableViewCell()
}
let user = users[indexPath.row]
let dataProvider = UserReusableCellDataProvider(user: user)
cell.set(with: dataProvider)
return cell
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment