I want the Swift version of this code:
NSArray *sortedNames = [names sortedArrayUsingSelector:@selector(localizedCaseInsensitiveCompare:)];
You can usually use the built-in
func sort(inout array: [T])
but if you want to use localizedCaseInsensitiveCompare:, your code can be translated directly using NSArray.
localizedCaseInsensitiveCompare:
NSArray