Table Cell Prototype

This commit is contained in:
Dallon Archibald
2021-01-23 18:41:31 -05:00
parent 74c2c76af9
commit 34cc04cd63
2 changed files with 114 additions and 83 deletions
+21 -1
View File
@@ -18,11 +18,31 @@ class StopwatchViewController: UIViewController {
@IBOutlet weak var resetButton: UIButton!
@IBOutlet weak var lapButton: UIButton!
@IBOutlet weak var tableView: UITableView!
var hours = 0
var minutes = 0
var seconds = 0
var timer = Timer()
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
}
extension StopwatchViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 100
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "lapCell", for: indexPath)
cell.textLabel?.text = "I am a lap cell \(indexPath.row + 1)"
return cell
}
}