I am using this to sort components in an array in Swift:
myArray = myArray.sorted { $0.localizedCaseInsensitiveCompare($1) == NSComparisonResult.OrderedAscen
You can use compare with .NumericSearch:
compare
.NumericSearch
array.sortInPlace { $0.compare($1, options: .NumericSearch) == .OrderedAscending }
or
let array2 = array.sort { $0.compare($1, options: .NumericSearch) == .OrderedAscending }