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
You could define an NSDictionary
property in your AnotherViewController
and set it from the previous controller. I'll give a brief example below.
//.h
@interface AnotherViewController {
NSDictionary *data;
}
@property(nonatomic,retain) NSDictionary *data;
@end
//.m
@implementation AnotherViewController
@synthesize data;
Now from the current controller, after initializing AnotherViewController
you set the dictionary before presenting it.
AnotherViewController *controller = [[AnotherViewController alloc] init];
controller.data = myCurrentDictionary;
Now AnotherViewController
has a data
property with the value of the previous controller.
Hope this helps.