I am using two viewcontrollers in my application. I have a button in my FirstViewController. When I select the button, it pushes the SecondViewController. I have a tableView in the SecondViewController. How to pass the indexpath value of the selected index in the tableView of SecondViewController to the FirstViewController, without using NSUserDefaults? Thanks in advance.
Share
Use Protocols. You can pass the value back to the parent view using delegates.
It is always better to use delegates (@Protocol) to callback the parent view controller.
A simple tutorial on that can be found here