2009-11-09

How to initiate an NSDictionary type of object with the contents of a plist

NSString *pathForplist = [[NSBundle mainBundle] pathForResource:@"Objects" ofType:@"plist"];

NSDictionary *dictionary = [[NSDictionary alloc] initWithContentsOfFile: pathForplist];

In my example, the plist file name is ‘Objects’.

No comments: