init(key:ascending:)
Creates a sort descriptor with a specified string key path and sort order.
Declaration
init(key: String?, ascending: Bool)Parameters
Return Value
A sort descriptor that initializes with the specified key path and sort order, and the default comparison selector (compare).