title: Passing a string from a TableView cell into a View Controller in Swift 3
body: <p>In Swift 3, I'd like to pass the string contained in a cell of a UITableView into the subsequent View Controller.</p>
  
  <p>As a note, I read several answers to this that seem to be specific to earlier versions of Swift, so I wanted to reopen. As an example, <a href="https://stackoverflow.com/questions/36252995/how-to-pass-selected-row-string-in-table-view-to-another-viewcontroller-page-s">the last solution</a> here looked straightforward, but I can't get it to work.</p>
  
  <p>In <code>TableViewController</code>, I create a string of an audio file's name and date posted with this JSON extraction:</p>
  
  <pre><code>if let shows_list = json as? NSArray
  {
      for i in 0 ..&lt; data_list.count
      {
          if let shows_obj = shows_list[i] as? NSDictionary
          {
              let episode_name = shows_obj["episode"] as? String
              let episode_date = shows_obj["date"] as? String
              TableData.append(episode_date! + " | " + episode_name!)
              let testString = TableData.append(episode_date! + " | " + episode_name!)
  
  // the part above runs and will add the string into each cell. now here, I want to pass the value of that string into a UILabel called episodeTitle in the target view controller
  
              func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
                  if let indexPath = self.tableView.indexPathForSelectedRow {
                      let destinationVC = segue.cellPasser
                      EpisodeViewController.text = testString //this is the string in second view controller
                  }
              }
          }
      }
  }
  </code></pre>
  
  <p>This is throwing two errors:</p>
  
  <ol>
  <li><code>Value of type 'UIStoryboardSegue' has no member 'cellPasser'</code></li>
  </ol>
  
  <p>In the Storyboard, I have added an identifier to the Show segue called 'cellPasser.' My belief is I should be able to call that here but it's being flagged.</p>
  
  <ol start="2">
  <li><code>EpisodeViewController.episodeTitle = testString</code></li>
  </ol>
  
  <p>I have an outlet in EpisodeViewController that is called <code>episodeTitle</code>, so I am wondering if there is a preferred way other than this to pass strings into an element like that. </p>
  
  <p>I'm new to Swift -- hoping someone sees a better way to do this. </p>
  
  <p>Edit: In case useful, here's the View Controller linked from the segue. </p>
  
  <pre><code>class EpisodeViewController: UIViewController {
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
          // Do any additional setup after loading the view.
      }
  
      @IBOutlet var episodeTitle: UILabel!
  </code></pre>