Skip to content

Instantly share code, notes, and snippets.

@susieyy susieyy/StoryBoardSample.swift Secret
Created Jan 14, 2017

Embed
What would you like to do?
#swtws
final class FirstViewController: UIViewController {
func segueToSecondViewController() {
let sender = "This is a second view!"
performSegue(withIdentifier: "SecondViewIdentifier", sender: sender)
}
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == "SecondViewIdentifier" {
let secondViewController = segue.destination as! SecondViewController
secondViewController.titleName = sender as! String
}
}
}
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.