辞書の配列を含む plist があります。
例:
items: (array)
item0: (dictionary)
Label: (string)
Img: (string)
item1: (dictionary)
Label: (string)
Img: (string)
NSLocalizedString を使用して、ラベルが翻訳されます。
このコードでは、すべてを辞書に入れ、その後配列に入れます。
NSString *myFile = [[NSBundle mainBundle] pathForResource:@"test" ofType:@"plist"];
NSDictionary *dict = [[NSDictionary alloc]initWithContentsOfFile:myFile];
NSMutableArray *arr = [[NSMutableArray alloc] initWithArray:[dict objectForKey:@"Items"]];
ただし、キーではなく、直接変換された値を配列に配置するにはどうすればよいですか?
ありがとうございます!