Callback function that compares two values. You provide a pointer to this callback in certain Core Foundation sorting functions.
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
- Core Foundation
The first value to compare.
The second value to compare.
An untyped pointer to the context of the evaluation.
The meaning of this value and its use are defined by each comparator function. This value is usually passed to a sort function, such as
CFArray, which then passes it, unchanged, to the comparator function.
Sort Values(_: _: _: _:)
CFComparison value that indicates whether the
val1 is equal to, less than, or greater than
CFComparison for a list of possible values.
If you need to sort the elements in a collection using special criteria, you can implement a comparator function with the signature defined by this prototype. You pass a pointer to this function in one of the “sort” functions, such as CFArray's