I'm trying to load my array from an array in my .Plist but its not working.
The plist looks like this:
This is the code I'm using:
NSString *path = [[NSBundle mainBundle]pathForResource:@"DiseasePropertyList" ofType:@"plist"];
NSMutableArray *rootLevel = [[NSMutableArray alloc]initWithContentsOfFile:path];
self.myArray = rootLevel;
[rootLevel release];
Try this. Please change file name. It works fine.
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *recentFilePath = [documentsDirectory stringByAppendingPathComponent:@"recent.plist"];
NSArray *history = [NSArray arrayWithContentsOfFile:recentFilePath];