I have a function I was using in Xcode 8 Beta, which sorted an array alphabetically then numerically.
The function I used was:
func sortArray(arrayToSort: [String])->[String]{
let sortedArray = arrayToSort.sorted {
(first, second) in
first.compare(second, options: .numericSearch) == ComparisonResult.orderedAscending
}
print(sortedArray)
return sortedArray
}
However this doesnt work anymore. Does anyone had any idea how I can do this in Swift 3?