Skip to content

Instantly share code, notes, and snippets.

@IhwanID
Created September 6, 2020 07:35
Show Gist options
  • Save IhwanID/fab415b65ec92d501a364782fe77f6bf to your computer and use it in GitHub Desktop.
Save IhwanID/fab415b65ec92d501a364782fe77f6bf to your computer and use it in GitHub Desktop.
extension ViewController: UITableViewDataSource, UITableViewDelegate{
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 15
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = UITableViewCell()
cell.textLabel?.text = "Cell at \(indexPath.row+1)"
return cell
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment