I'm working on a app where the user can create a tournament.
What I'm trying to do right now is when the user taps on the button "Select players" inside the CreateTournamentViewController
, a PlayersTableViewController
should pop up.
Then the user selects all the players. After he is finished and tapped on "Done", the PlayersTableViewController
should close and pass the data back to the CreateTournamentViewController
.
Now my question is: What is the best way to achieve this?
I would do it like this: CreateTournamentViewController
has an array var players = [Player]
. After selecting the players in the PlayersTableViewController
, I would set this player array: players = createTournamentViewController.players
.
But is this really the best way to do it?
Thanks for the help.