IOSでplistファイルを読み込む方法
コード下記:
NSBundle *bundle = [NSBundle mainBundle];
//プロパティリスト名Property List リソースタイプplist
NSString *path = [bundle pathForResource:@"Property List" ofType:@"plist"];
// plistにNSDictionaryを設定
NSDictionary *dict = [[[NSDictionary alloc] initWithContentsOfFile:path] objectForKey:@"user"];
NSArray *list = [dict objectForKey:@"user_1″];
for (int i = 0, len = [list count]; i < len; i++) {
NSLog(@"%@", [list objectAtIndex:i]);
}