Skip to content

Instantly share code, notes, and snippets.

@brandoncordell
Created August 21, 2011 01:21
Show Gist options
  • Save brandoncordell/1159943 to your computer and use it in GitHub Desktop.
Save brandoncordell/1159943 to your computer and use it in GitHub Desktop.
Loading a plist into an array
NSString *plistPath = [[NSBundle mainBundle] pathForResource:@"Info"
ofType:@"plist"];
NSFileManager *fm = [NSFileManager defaultManager];
if ([fm fileExistsAtPath:plistPath])
NSLog(@"File Exists");
else
NSLog(@"File not found");
NSArray *tmpArray = [[NSArray alloc] initWithContentsOfFile:plistPath];
NSLog(@"Array Count: %i", [tmpArray count]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment