I have an application in which I have a webservice call that returns data as a dictionary. I want to access this dictionary in another view controller for loading the values into a table.
Can anybody demonstrate how to pass this response dictionary from one view controller to another?
You could define an
NSDictionaryproperty in yourAnotherViewControllerand set it from the previous controller. I’ll give a brief example below.Now from the current controller, after initializing
AnotherViewControlleryou set the dictionary before presenting it.Now
AnotherViewControllerhas adataproperty with the value of the previous controller.Hope this helps.