Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
MiniCursoIFSPSwiftSegueProgramaticamente
// MARK: - Table View
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
let animal = self.animalsArray[indexPath.row]
//programaticamente
let storyboard = UIStoryboard(name: "Home", bundle: nil)
if let vc = storyboard.instantiateViewController(withIdentifier: "DetailViewControllerID") as? DetailViewController {
vc.selectedAnimal = animal
vc.delegate = self;
self.navigationController?.pushViewController(vc, animated: true)
}
}
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.