Instance Method

keysSortedByValueUsingComparator:

Returns an array of the dictionary’s keys, in the order they would be in if the dictionary were sorted by its values using a given comparator block.

Declaration

- (NSArray<KeyType> *)keysSortedByValueUsingComparator:(NSComparator)cmptr;

Parameters

cmptr

A comparator block.

Return Value

An array of the dictionary’s keys, in the order they would be in if the dictionary were sorted by its values using cmptr.

See Also

Sorting Dictionaries

- keysSortedByValueUsingSelector:

Returns an array of the dictionary’s keys, in the order they would be in if the dictionary were sorted by its values.

- keysSortedByValueWithOptions:usingComparator:

Returns an array of the dictionary’s keys, in the order they would be in if the dictionary were sorted by its values using a given comparator block and a specified set of options.