Skip to content

Instantly share code, notes, and snippets.

@AndreyPanov
Created January 12, 2017 15:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndreyPanov/62938a1a909d027ab7a7de6aa1a54d09 to your computer and use it in GitHub Desktop.
Save AndreyPanov/62938a1a909d027ab7a7de6aa1a54d09 to your computer and use it in GitHub Desktop.
PrepareForSegue
func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == "openControllerA" {
let vc = segue.destinationViewController as! ControllerA
vc.monkey = 🐒
} else if segue.identifier == "openControllerB" {
let vc = segue.destinationViewController as! ControllerB
vc.tiger = 🐯
} else if segue.identifier == "openControllerC" {
let vc = segue.destinationViewController as! ControllerC
vc.frog = 🐸
} else if segue.identifier == "openControllerD" {
let vc = segue.destinationViewController as! ControllerD
vc.snake = 🐍
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment