iOS - Showing info from tableView didSelect
<p>I currently have a tableView and when the cell has been pressed I want to show certain data. The tableView currently has 2 cells 'Set One', 'Set Two'. </p>

<p>If cell with title 'Set One' didSelect then I would like the next View Controller to show the data for this cell.</p>

<p>Here is the data from Core Data:</p>

<pre><code>// MusicSet One
defaultMusicSet!.uri = "spotify:track:1puJlKuYGH58SAFgXREUpE"
defaultMusicSet!.duration = 30.0
defaultMusicSet!.starttime = 40.0
defaultMusicSet!.xfade = 10.0
defaultMusicSet!.voiceover = "1.25s Next Up.mp3"

// MusicSet Two
defaultMusicSet!.uri = "spotify:track:59XO64Te17WcmnmMQXQbOj"
defaultMusicSet!.duration = 30.0
defaultMusicSet!.starttime = 34.75
defaultMusicSet!.xfade = 10.0
defaultMusicSet!.voiceover = "1.25s Rest.mp3"
</code></pre>

<p>In the ViewController I have textFields called 'txtUri', 'txtDuration' etc. Now if I press on the first cell I would like to show //MusicSet One data only, and the same if I press on the 2nd cell it will only show the //MusicSet Two data.</p>

<p>I know the code will have to go inside the tableView (didSelect), but how to show certain information i'm not 100% sure on how to do this?</p>

<p>This won't work, but I kinda know that I need something like this? or similar... </p>

<pre><code>let musicData: playViewController?

musicData?.txtUri.text = Music.DefaultMusicSet.uri
</code></pre>

<p>Any help would be great!</p>