Generic Initializer

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 SortOrder.forward sort order; otherwise, it uses SortOrder.reverse.

See Also 参照

Creating a Sort Descriptor ソート記述子を作成する