Contents

init(key:ascending:)

Creates a sort descriptor with a specified string key path and sort order.

Declaration

init(key: String?, ascending: Bool)

Parameters

  • key:

    The key path for performing a comparison.

    For information about key paths, see 10000107i.

  • ascending:

    True if the receiver specifies sorting in ascending order; otherwise, False.

Return Value

A sort descriptor that initializes with the specified key path and sort order, and the default comparison selector (compare).

See Also

Creating a Sort Descriptor