Skip to content

Instantly share code, notes, and snippets.

@hmlongco
Created July 31, 2021 15:07
Show Gist options
  • Save hmlongco/03e2ad2514b1ee83af9292171a3335c1 to your computer and use it in GitHub Desktop.
Save hmlongco/03e2ad2514b1ee83af9292171a3335c1 to your computer and use it in GitHub Desktop.
With in tableviews
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
switch section {
case 0:
return tableView.dequeueCell(CELLID, for: indexPath) { (_ cell: MyTableViewCell) in
cell.configure(viewModel.config((for: indexPath.section))
}
case 1:
...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment