Sorts the receiver’s cells in ascending order as defined by the specified comparison function.
- macOS 10.0+
The function to use when comparing cells. The comparison function is used to compare two elements at a time and should return
NSOrderedif the first element is smaller than the second,
NSOrderedif the first element is larger than the second, and
NSOrderedif the elements are equal.
Context passed to the comparison function as its third argument, each time its called. This allows the comparison to be based on some outside parameter, such as whether character sorting is case-sensitive or case-insensitive.