Instance Method

sortedArray(using:)

Returns an array of the set’s content sorted as specified by a given array of sort descriptors.

Declaration

func sortedArray(using sortDescriptors: [NSSortDescriptor]) -> [Any]

Parameters

sortDescriptors

An array of NSSortDescriptor objects.

Return Value

An NSArray containing the set’s content sorted as specified by sortDescriptors.

Discussion

The first descriptor specifies the primary key path to be used in sorting the set’s contents. Any subsequent descriptors are used to further refine sorting of objects with duplicate values. See NSSortDescriptor for additional information.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software