Initializer

init(_:comparator:order:)

Creates a sort descriptor using a key path to an optional string that uses a sort order that you specify.

Declaration 宣言

init(_ keyPath: KeyPath<Compared, String?>, comparator: String.StandardComparator = .localizedStandard, order: SortOrder) where Compared : NSObject

Parameters パラメータ

keyPath

A key path to an optional string.

comparator

The comparator to use to sort strings, which defaults to localizedStandard.

order

The sort order to apply. 適用するソート順序。

See Also 参照

Creating Sort Descriptors with Key Paths to Strings