sortedArray(using:)
Returns a copy of the receiving array sorted as specified by a given array of sort descriptors.
Declaration
func sortedArray(using sortDescriptors: [NSSortDescriptor]) -> [Any]Parameters
- sortDescriptors:
An array of
NSSortDescriptorobjects.
Return Value
A copy of the receiving array sorted as specified by sortDescriptors.
Discussion
The first descriptor specifies the primary key path to be used in sorting the receiving array’s contents. Any subsequent descriptors are used to further refine sorting of objects with duplicate values. See NSSortDescriptor for additional information.