2011-05-24 309 views

回答

18
[myArray sortUsingSelector:@selector(caseInsensitiveCompare:)]; 
2

如果陣列由NSStrings

[companies sortUsingSelector:@selector(compare:)]; 
3
NSArray *sortedStrings = [strings sortedArrayUsingSelector:@selector(compare:)];