Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. //ADD TO Player1ViewController.swift
  2. override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
  3. let vc = segue.destination as! Player2ViewController;
  4. vc.p1Name = player1Name;
  5. vc.p2Name = player2Name;
  6.  
  7. if (segue.identifier == "rock") {
  8. vc.p1Selection = "rock";
  9. }
  10. else if (segue.identifier == "paper") {
  11. vc.p1Selection = "paper";
  12. }
  13. else if (segue.identifier == "scissors") {
  14. vc.p1Selection = "scissors";
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement