Skip to content

Instantly share code, notes, and snippets.

@stevencurtis
Created May 6, 2020 10:46
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 stevencurtis/1a0a77acf009f8051702cf0d99261fe3 to your computer and use it in GitHub Desktop.
Save stevencurtis/1a0a77acf009f8051702cf0d99261fe3 to your computer and use it in GitHub Desktop.
tableViewdelegate
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as! CustomTableViewCell
cell.nameLabel.text = data[indexPath.row]
cell.cellIndex = indexPath
cell.delegate = self
return cell
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment