I have a view with a button and a label on it. Now when I click on that button, I will be taken to another page (view) that displays a Tableview with some values populated in it.
I have successfully coded the button and the label view, and also the populating part of the tableview.
Now what I need to do is, when I click on an item or a row, in the tableview, that value should be shown on the previous page (that contained a button and a label). How should I do this? Any idea?
Note: I can’t provide any code, because I am on my Linux machine 🙁
Maybe the best solution is coding a protocol.
In
myProtocol.hThen, in the interface file of the viewController that contains your tableView:
In .m file:
The viewController that contains the button and the label must implement your delegate:
In .h:
In .m:
In some part of your code you will have to set the delegate
Hope this helps