Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
extension HomeViewController : UITableViewDataSource {
//Métodos obrigatórios
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return self.animalsArray.count
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
guard let cell = tableView.dequeueReusableCell(withIdentifier: homeCellIndentifier, for: indexPath) as? HomeTableViewCell else {
fatalError("Cannot create Home Table View Cell")
cell.initWithAnimal(animal: self.animalsArray[indexPath.row])
return cell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.