Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Passing Information With Segues Example iOS
import UIKit
import FutureKit
class ListOfFruitsViewController: UITableViewController {
...
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
if (segue.identifier == "goToFruitDetailsSegue") {
if let
fruitDetailController = segue.destinationViewController as? FruitDetailViewController,
selectedFruit = self.selectedFruit
{
fruitDetailController.fruit = selectedFruit
}
}
}
}
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.