Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ファイルには、それぞれ 2 つのキーを持つ 9 つの辞書があります。辞書の配列を取得したいのですが、配列の要素は次のとおりです: 0 これはコードです:
NSString * path = [[NSBundle mainBundle]pathForResource:@"List" ofType: @"plist"]; NSArray *array = [NSArray arrayWithContentsOfFile:path];
前もって感謝します
NSString *file = [[NSBundle mainBundle] pathForResource:@"List" ofType:@"plist"]; NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:file]; NSArray *array = [dict objectForKey:@"Array"];
お役に立てれば
あなたのplistは配列ではなく辞書です。だからこれをチェックしてください。