複数の文字列を含む複数の配列を含む NSDictionary があります。各配列の下にあるすべての文字列を 1 つの配列に配置したいと考えています。一度にすべての文字列を受け取るにはどうすればよいですか? 私はこれを試しました:
NSMutableArray *mutarr = [[NSMutableArray alloc] initWithObjects:[self.firstTableView allValues], nil];
NSArray *mySorted = [[NSArray alloc]init];
mySorted = [mutarr sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
NSLog(@"First table view values: %@", mySorted);
注: self.firsttableview は、次のような NSDictionary です。
NSString *path = [[NSBundle mainBundle] pathForResource:@"firstTableView" ofType:@"plist"];
self.firstTableView = [NSDictionary dictionaryWithContentsOfFile:path];
効果: これにより NSLog にリストが表示されますが、アルファベット順ではありません。