Created
November 18, 2016 15:56
-
-
Save sebastianconcept/bbf59b56e388b977a583e3660182e748 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override func prepare(for segue: UIStoryboardSegue, sender: Any?) { | |
switch segue.identifier! { | |
case "showTodoDetail": | |
// Get the detail view controller in a local var | |
let todoDetailVC = segue.destination as! TodoDetailViewController | |
// Get the specific model in a local var | |
let cell = sender as! TodoTableViewCell | |
// Set the model in the detail view controller | |
todoDetailVC.todo = cell.todo | |
default: break | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment