Initializes a sort descriptor with a given key path, ordering, and comparison selector.
- iOS 2.0+
- macOS 10.3+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
The key path to use when performing a comparison.
For information about key paths, see Key-Value Coding Programming Guide.
trueif the receiver specifies sorting in ascending order, otherwise
The method to use when comparing the properties of objects, for example
localized. The selector must specify a method implemented by the value of the property identified by the key path. The selector used for the comparison is passed a single parameter, the object to compare against, and must return the appropriate
A sort descriptor initialized with the specified key path, sort order, and comparison selector.