Created
May 6, 2020 13:22
-
-
Save stevencurtis/25694b7ac466d992f78da0b74a697519 to your computer and use it in GitHub Desktop.
ViewControllerprepare
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
extension ViewController { | |
// MARK: - Navigation | |
override func prepare(for segue: UIStoryboardSegue, sender: Any?) { | |
if segue.identifier == "detail" { | |
if let destination = segue.destination as? DetailViewController { | |
if let index = sender as? IndexPath { | |
destination.dataString = data[index.row] | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment