title: Passing data back from view controllers Xcode
body: <p>A couple of weeks ago I asked <a href="https://stackoverflow.com/q/25345262/2976720">this</a> question and got a very detailed explanation. Now I would like to pass data back to the first ViewController but I keep getting stuck using the same method. I have a modal of the first VC to the second, where I would like to edit an array of strings, which will be showed on the first view again. So on my first view I have an array of data, which should be passed to the second so edit fields show the current information after which the user has to be able to edit the contents of the array and pass that data back to the first where it is shown on labels. I'm using Swift.</p>
  
  <p>My code:</p>
  
  <p>(in ViewController.swift:) </p>
  
  <pre><code>override func prepareForSegue(segue: UIStoryboardSegue!, sender: AnyObject!) {
          let secondVC = segue.destinationViewController as SecondViewController
          secondVC.namesPlayers = self.namesPlayers
      }
  </code></pre>
  
  <p>(in SecondViewController.swift:)</p>
  
  <pre><code>override func viewDidLoad() {
      super.viewDidLoad()
      labelFirstPlayer.text = namenSpelers[0]
  }
  </code></pre>
  
  <p>Thank you</p>