Contents

init(keyPath:ascending:)

Creates a sort descriptor with a specified key path and ordering.

Declaration

convenience init<Root, Value>(keyPath: KeyPath<Root, Value>, ascending: Bool)

Parameters

  • keyPath:

    The key path to the property to compare.

  • ascending:

    If true, the sort descriptor compares using the Forward sort order; otherwise, it uses Reverse.

See Also

Creating a Sort Descriptor