Initializer

init(_:comparator:)

Creates a sort descriptor using a key path to a string.

Declaration 宣言

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

Parameters パラメータ

keyPath

A key path to a string.

comparator

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

See Also 参照

Creating Sort Descriptors with Key Paths to Strings