NSDictionary to NSArray
suggest changecopy on a dictionary returns another dictionary, not an array. Use allKeys and allValues.
NSDictionary *myDictionary = [[NSDictionary alloc] initWithObjectsAndKeys:@"value1", @"key1", @"value2", @"key2", nil];
Get keys:
NSArray *keys = [myDictionary allKeys];
Get values:
NSArray *values = [myDictionary allValues];
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents