如何在 plist 文件中的字典中访问字典中的字符串?我试过这个但它不起作用:
NSString *myfile = [[NSBundle mainBundle] pathForResource: arrayname ofType:@"plist"];
WordsDic = [[NSDictionary alloc] initWithContentsOfFile:myfile];
words = [WordsDic allKeys];
insidedic = [[NSDictionary alloc] initWithDictionary:[[words objectAtIndex:0] ]];;
level2 = [insidedic allKeys];
然后我尝试了这个但我得到了一个错误
for (NSString *parent in words) {
insidedic = [WordsDic objectForKey:parent];
level2 = [insidedic allKeys];
NSLog(@"%@", level2);
}