「ios開発」plistファイルの読み込みサンプル方法

サンプルコード:

NSBundle* bundle = [NSBundle mainBundle];
NSString* path = [bundle pathForResource:@"startnews24″ ofType:@"plist"];
NSDictionary* dic = [NSDictionary dictionaryWithContentsOfFile:path];
NSArray *items =[NSArray arrayWithArray:[dic objectForKey:@"Root"]];
for(NSDictionary* str in items){
NSLog(@"%@",[str objectForKey:@"japanese"]);
NSLog(@"%@",[str objectForKey:@"english"]);
}

IOS

Posted by arkgame