Skip to content

Instantly share code, notes, and snippets.

@yabenatti
Created November 12, 2017 13:01
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 yabenatti/4de8847d710344936c13dc3d0ec708bb to your computer and use it in GitHub Desktop.
Save yabenatti/4de8847d710344936c13dc3d0ec708bb to your computer and use it in GitHub Desktop.
TableViewTutorial03
extension ViewController : UITableViewDelegate {
//1 - método chamado quando uma linha é selecionada
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
}
//2 - método para definir a altura de cada linha
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 44
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment