Created
August 21, 2011 01:21
-
-
Save brandoncordell/1159943 to your computer and use it in GitHub Desktop.
Loading a plist into an array
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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