我有一个 NSDictionary,我必须将它添加到 NSArray。我该怎么做?
NSDictionary *row = [NSDictionary dictionaryWithObjectsAndKeys:
[NSString stringWithFormat:@"%@",NSLocalizedString(@"no_favorites", nil)], @"Address", nil];
如果我使用:
aFavorite = [row allValues];
as sugested, if I print it I got:
(
"No favorites added"
)
What I need is:
(
{
Address = "No favorites added";
}
)
Because I will use:
NSDictionary* dict = [aFavorite objectAtIndex:[indexPath row]];
NSString *contentForThisRow = [dict objectForKey:@"Address"];
The dict value can have 1 or 2 keys.