Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //ADD TO Player1ViewController.swift
- override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
- let vc = segue.destination as! Player2ViewController;
- vc.p1Name = player1Name;
- vc.p2Name = player2Name;
- if (segue.identifier == "rock") {
- vc.p1Selection = "rock";
- }
- else if (segue.identifier == "paper") {
- vc.p1Selection = "paper";
- }
- else if (segue.identifier == "scissors") {
- vc.p1Selection = "scissors";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement