The code below works for sorting an array of strings if they are all lowercase or all uppercase but I want to ignore case when I sort. How could I do this? The following is
This is the method that should be used and is intended for this purpose:
public func caseInsensitiveCompare(aString: String) -> NSComparisonResult
In your case:
resultListArray.sort({ $0.fileName.caseInsensitiveCompare($1.fileName) == NSComparisonResult.OrderedAscending })