I have a UITableViewController with a textLabel and a detailTextLabel, the thing is that I want to pass a let’s say “hidden” third value which has an URL, so when I touch the row to the next UITableViewController I could use the delegate didSelectRowAtIndexPath to get the URL but how can I do this?
I have a UITableViewController with a textLabel and a detailTextLabel , the thing is
Share
You can send a dictionary to the next TableView. Import the SecondTableView controller .h file into your FirstTableView controller and then reference the target dictionary. You will also need to implement prepareForSegue and call it in didSelectRowAtIndexPath. Something like this:
In didSelectRowAtIndexPath: (make sure to set the segue identifier in Storyboard if you are using it).
In SecondTableViewController.h create your dictionary
Make sure to synthesize this in the SecondTableViewController.m file.
and then in your FirstTableViewController
You can then reference keys in the selectedDictionary in your SecondTableViewController and get that URL.