Created
January 12, 2017 15:59
-
-
Save AndreyPanov/62938a1a909d027ab7a7de6aa1a54d09 to your computer and use it in GitHub Desktop.
PrepareForSegue
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
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