I have an array containing NSDate objects. With Objective-C, I am able to sort this array by using:
NSDate
NSArray *array = [unsortedArray sortedArrayU
Using the native Array type in Swift. If you are interfacing with legacy code from ObjC, use this:
Array
let array = unsortedArray.sortedArrayUsingSelector("compare:")