-
-
Save susieyy/ae2e6a24f533500d811895d66e1a3532 to your computer and use it in GitHub Desktop.
#swtws
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
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