Skip to content

Instantly share code, notes, and snippets.

@SlappyAUS
Last active October 9, 2020 23:49
Show Gist options
  • Save SlappyAUS/bcb16e2f3fb2efd8cd1e27cb5f0ad1c4 to your computer and use it in GitHub Desktop.
Save SlappyAUS/bcb16e2f3fb2efd8cd1e27cb5f0ad1c4 to your computer and use it in GitHub Desktop.
TableViewDataSource #ui
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return itemArray.count
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "ToDoItemCell", for: indexPath)
cell.textLabel?.text = itemArray[indexPath.row]
return cell
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment