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