Passing data from table cell to view controller (Parse + Swift)

Hi everyone. Just a very quick question. I’m currently trying to learn some swift and parse in my spare time. I’m trying to make a table pass data from its cell into the view controller. The data is supplied by Parse. I’ve written some code with the help from a tutorial.

I am able to fill my table cell with the title from parse. But when I click on the cell to pass the data to the view controller, the view controller won’t open and the cell just gets highlighted. Could you please quickly look at the code (very short script) and let me know you think I’m going wrong please? I’ve been scratching my head for days.

I’ve uploaded the two view controllers to my dropbox account.

any help would be much appreciated. thank you

I haven’t looked at your view controllers - but the first thing to check is that you have
func tableView(UITableView, didSelectRowAt: IndexPath) implemented. When your cell is selected then you have this function called by the tableview. When it is called you get the indexPath, same as you did when filling the cell (which you did successfully) so you have access to the same data you had when you filled the cell.

1 Like

that is amazing! all sorted. thank you so much for your help!