5.8. Tapping a cell in TableView and Practice exercise
//
// ViewController.swift
// App5
//
// Created by Sakib Miazi on 5/18/23.
//
//codes omitted...
extension ViewController: UITableViewDelegate, UITableViewDataSource{
//codes omitted...
//MARK: deal with user interaction with a cell...
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
print(self.expenses[indexPath.row])
}
}
Exercise
Previous5.7. Second screen, part 3: Send new expense back to ViewController and update the TableViewNext5.9. Reference Code
Last updated