Skip to content

Instantly share code, notes, and snippets.

@rockname
Last active December 8, 2018 06:56
Show Gist options
  • Select an option

  • Save rockname/07451c832022b4c985f7bd8e3c789fc9 to your computer and use it in GitHub Desktop.

Select an option

Save rockname/07451c832022b4c985f7bd8e3c789fc9 to your computer and use it in GitHub Desktop.
func configureCell(_ cell: UITableViewCell, withValue value: Any) {}
.
.
.
final func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let row = self.sections[indexPath.section].rows[indexPath.row]
let cell = tableView.dequeueReusableCell(withIdentifier: row.reusableId, for: indexPath)
self.configureCell(cell, withValue: row.value) //
return cell
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment